This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require "spec_helper" | |
require_relative "../../../../lib/client.rb" | |
require_relative "../../../../lib/platform.rb" | |
class Settings | |
def self.m1; end | |
def self.m2; end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** 18.05.2018 | |
- On repeating statements | |
Noch einmal, bitte! Again, please! | |
Kannst du das wiederholen? Can you repeat? | |
- About Woher and wohnen | |
Woher kommst du? Ich komme aus ... | |
Wo wohnen Sie? Ich wohne in... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def module Domain::DealCreator | |
def new(params) | |
@deal = Deal.new(deal) | |
end | |
def save(deal_params) | |
deal = Deal.new(deal) | |
default_time | |
info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ch1.money) | |
(declare validate-same-currency) | |
(defrecord Currency [divisor sym desc]) | |
(defrecord Money [amount ^Currency currency] | |
java.lang.Comparable | |
(compareTo [m1 m2] | |
(validate-same-currency m1 m2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
found = false | |
(1..5).each do |index| | |
sleep 1 | |
os_name = (@driver.find_element(:xpath, "html/body/div[1]/ul/li[1]/ul/li[15]/ul/li[#{index}]/ul/li[1]/span[2]").text) | |
if os_name == "\"Linux Debian 7\"" | |
!60.times{ break if (@driver.find_element(:xpath, "html/body/div[1]/ul/li[1]/ul/li[15]/ul/li[#{index}]/ul/li[2]/span[2]").text == "\"SVNLICDLD02\"" rescue false); sleep 1 } | |
(@driver.find_element(:xpath, "html/body/div[1]/ul/li[1]/ul/li[15]/ul/li[#{index}]/ul/li[2]/span[2]").text).should == "\"SVNLICDLD02\"" | |
!60.times{ break if (@driver.find_element(:xpath, "html/body/div[1]/ul/li[1]/ul/li[15]/ul/li[#{index}]/ul/li[3]/span[2]").text == "0" rescue false); sleep 1 } | |
(@driver.find_element(:xpath, "html/body/div[1]/ul/li[1]/ul/li[15]/ul/li[#{index}]/ul/li[3]/span[2]").text).should == "0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Status Code Status Message Symbol | |
1xx Informational | |
100 Continue :continue | |
101 Switching Protocols :switching_protocols | |
102 Processing :processing | |
2xx Success | |
200 OK :ok | |
201 Created :created | |
202 Accepted :accepted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record' | |
connection_info = YAML.load_file("config/database.yml")["test"] | |
ActiveRecord::Base.establish_connection(connection_info) | |
RSpec.configure do |config| | |
config.around do |example| | |
ActiveRecord::Base.transaction do | |
example.run | |
raise ActiveRecord::Rollback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'minitest/autorun' | |
class TestDescribe < Minitest::Test | |
def test_that_it_can_pass | |
whatever "that it describes" do | |
another_block "lol" do | |
end | |
end | |
end |
NewerOlder