Skip to content

Instantly share code, notes, and snippets.

@certainty
Created November 16, 2012 08:11
Show Gist options
  • Save certainty/4085371 to your computer and use it in GitHub Desktop.
Save certainty/4085371 to your computer and use it in GitHub Desktop.
foo
shared_examples "foo" do |a,args|
it "is true" do
true.should be_true
end
end
describe "some context" do
def self.user
:user
end
def self.valid_args
{ :foo => "bar", :baz => user }
end
%(foo bar baz).each do |a|
it_should_behave_like "foo", a,valid_args
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment