Skip to content

Instantly share code, notes, and snippets.

@bilus
Created April 28, 2017 20:56
Show Gist options
  • Save bilus/72ad145f8715cb62c286539b84dcc922 to your computer and use it in GitHub Desktop.
Save bilus/72ad145f8715cb62c286539b84dcc922 to your computer and use it in GitHub Desktop.
RSpec.describe Package do
let(:package) { described_class.new(owner: owner) }
describe '#company_owned?' do
subject { package.company_owned? }
context 'when owned by User' do
let(:owner) { User.new }
it { is_expected.to be_truthy }
end
context 'when owned by Company' do
let(:owner) { Company.new }
it { is_expected.to be_falsey }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment