Skip to content

Instantly share code, notes, and snippets.

@shuber
Created December 12, 2018 05:03
Show Gist options
  • Save shuber/6564217aede7b70bf874b0baf3e50af8 to your computer and use it in GitHub Desktop.
Save shuber/6564217aede7b70bf874b0baf3e50af8 to your computer and use it in GitHub Desktop.
RSpec.describe Foo::Bar do
let(:obj) { OpenStruct.new(name: 'dummy', ops: '-l -a', post_cmd: true) }
it 'should run test 1' do
# test
# will fail if post_cmd is false
end
it 'should run test 2' do
# test
end
context 'obj with post_cmd attribute as false' do
before { obj.post_cmd = 'false' }
it 'should run test 3' do
# test
end
it 'should run test 4' do
# test
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment