Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save avegancafe/253f2daa60afdc2c87f52dfc4aa4ad92 to your computer and use it in GitHub Desktop.

Select an option

Save avegancafe/253f2daa60afdc2c87f52dfc4aa4ad92 to your computer and use it in GitHub Desktop.
Examples for RSpec Formatting Blog Post - space_authority_outcome_naming_spec.rb
describe SpaceAuthority do
describe '#authorized_spaces' do
let!(:account) { create(:account) }
let!(:user) { create(:user) }
let!(:authorized_space) do
property = create(:property, primary_account: account, users: [user])
create(:space, property: property)
end
let!(:unauthorized_space) do
property = create(:property, primary_account: account)
create(:space, property: property)
end
subject { described_class.new(user).authorized_spaces }
it 'only lists authorized spaces' do; end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment