Skip to content

Instantly share code, notes, and snippets.

@slowjack2k
Created January 8, 2014 16:11
Show Gist options
  • Save slowjack2k/8319290 to your computer and use it in GitHub Desktop.
Save slowjack2k/8319290 to your computer and use it in GitHub Desktop.
rspec shared groups using shared groups
require 'shared_group_2'
shared_examples "success example" do
it_behaves_like "failing example"
it "success" do
expect(true).to be_true
end
end
shared_examples "failing example" do
it "fails" do
expect(fail).to be_true
end
end
require 'spec_helper'
require 'shared_group'
describe Object do
it_behaves_like "success example"
end
@slowjack2k
Copy link
Author

rspec spec/using_spec.rb:4 <= calls "success example"

rspec -l 4 spec/using_spec.rb <= calls "failing example" & "success example"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment