Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shoulda matchers omitted on rails_helper
- # Shoulda::Matchers.configure do |config|
- # config.integrate do |with|
- # with.test_framework :rspec
- # with.library :rails
- # end
- # end
- # task_spec.rb
- require 'rails_helper'
- RSpec.describe Task, type: :model do
- DatabaseCleaner.start
- it "is valid with valid attributes" do
- expect(Task.new).to be_valid
- end
- it "is not valid without a name"
- it "is not valid without a description"
- it "is not valid without a completion"
- end
- # Output from command RAILS_ENV=test bundle exec rspec
- .***
- Pending: (Failures listed here are expected and do not affect your suite's status)
- 1) Task is not valid without a name
- # Not yet implemented
- # ./spec/models/task_spec.rb:11
- 2) Task is not valid without a description
- # Not yet implemented
- # ./spec/models/task_spec.rb:12
- 3) Task is not valid without a completion
- # Not yet implemented
- # ./spec/models/task_spec.rb:13
- Finished in 0.20954 seconds (files took 0.71481 seconds to load)
- 4 examples, 0 failures, 3 pending
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement