Created
January 14, 2012 19:35
-
-
Save pragmaticpat-zz/1612623 to your computer and use it in GitHub Desktop.
Wondering if it's by design that rspec-given will not evaluate missing methods until "then" is present
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 'concept_im_evolving' | |
require 'rspec/given' | |
#Sample1: Run rspec >> No examples found. | |
describe ConceptImEvolving do | |
Given (:getter) { ConceptImEvolving.new } | |
context "when there is a new item" do | |
When { getter.get_latest_item("some_uri") } | |
end | |
end | |
#Sample2: Run rspec >> I get NoMethodError for "getter" | |
describe ConceptImEvolving do | |
Given (:getter) { ConceptImEvolving.new } | |
context "when there is a new item" do | |
When { getter.get_latest_item("some_uri") } | |
Then {} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment