diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/operation_spec.rb | 4 | ||||
-rw-r--r-- | spec/rails_helper.rb | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/operation_spec.rb b/spec/models/operation_spec.rb index 1293524..6c59f21 100644 --- a/spec/models/operation_spec.rb +++ b/spec/models/operation_spec.rb @@ -13,6 +13,10 @@ RSpec.describe Operation, type: :model do # end subject { described_class.new(name: "Spuds", organisation: organisation) } + describe "associations" do + it { should belong_to(:organisation).class_name('Organisation') } + end + describe "existence" do it "exists!" do expect(subject).to be_valid diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index b30b931..4ff79f4 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -36,6 +36,13 @@ RSpec.configure do |config| Rails.root.join('spec/fixtures') ] + Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.test_framework :rspec + with.library :rails + end + end + # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false # instead of true. |