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
| /Applications/TextMate.app/Contents/SharedSupport/Support/lib/builder.rb:86:in `blank_slate_method_added': stack level too deep (SystemStackError) from | |
| /Applications/TextMate.app/Contents/SharedSupport/Support/lib/builder.rb:86:in `blank_slate_method_added' | |
| from /Users/david/.rvm/gems/ruby-1.8.7-p302@rspec-all/gems/builder-2.1.2/lib/blankslate.rb:84:in `method_added' | |
| from /Users/david/.rvm/gems/ruby-1.8.7-p302@rspec-all/gems/builder-2.1.2/lib/blankslate.rb:104 | |
| from /Users/david/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
| from /Users/david/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
| from /Users/david/.rvm/gems/ruby-1.8.7-p302@rspec-all/gems/activesupport-2.3.10/lib/active_support/basic_object.rb:21 | |
| from /Users/david/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
| from /Users/david/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/ru |
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
| ruby-1.8.7-p302 > initialized_with_symbol_keys = {:a => 1}.with_indifferent_access | |
| => {"a"=>1} | |
| ruby-1.8.7-p302 > initialized_with_symbol_keys == {"a" => 1} | |
| => true | |
| ruby-1.8.7-p302 > initialized_with_symbol_keys[:a] == 1 | |
| => true | |
| ruby-1.8.7-p302 > initialized_with_symbol_keys["a"] == 1 | |
| => true | |
| ruby-1.8.7-p302 > {"a" => 1} == initialized_with_symbol_keys | |
| => true |
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 'rspec/core' | |
| RSpec.configure do |c| | |
| c.color_enabled = true | |
| c.filter_run_including :focused => true | |
| c.run_all_when_everything_filtered = true | |
| 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
| RSpec.configure do |c| | |
| c.around do |example| | |
| Capybara.using_driver(example.metadata[:driver], &example) | |
| end | |
| end | |
| module Capybara | |
| def self.using_driver(driver) | |
| Capybara.current_driver = driver | |
| yield |
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
| #RSpec Mocks... | |
| it "does something with a collaborator" do | |
| #Given | |
| collab = mock(:collab) | |
| it.collaborator = collab | |
| #Then | |
| collab.should_receive(:call).with(3) | |
| #When |
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
| #RSpec Mocks... | |
| it "does something with a collaborator" do | |
| #Given | |
| collab = mock(:collab) | |
| it.collaborator = collab | |
| #Then | |
| collab.should_receive(:call).with(3) | |
| #When |
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
| describe Controller do | |
| context "create" do | |
| it "saves the model" do | |
| model = Model.new | |
| Model.stub(:new).and_return(model) | |
| model.should_receive(:save) | |
| post :create | |
| end | |
| end | |
| 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
| describe "outer" do | |
| describe "a" do | |
| it "b" do | |
| end | |
| it "c" do | |
| end | |
| end | |
| describe "d" do |