Skip to content

Instantly share code, notes, and snippets.

@todesking
Created June 23, 2013 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todesking/5844266 to your computer and use it in GitHub Desktop.
Save todesking/5844266 to your computer and use it in GitHub Desktop.
rspec itss
def itss(name, &block)
describe name do
it { subject.instance_eval(name).instance_eval(&block) }
end
end
describe A do
subject { A.new }
itss('name.length') { should == 4 }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment