Skip to content

Instantly share code, notes, and snippets.

@pragmaticpat-zz
Created January 14, 2012 19:35
Show Gist options
  • Save pragmaticpat-zz/1612623 to your computer and use it in GitHub Desktop.
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
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