Merge pull request #16 from turniere/ticket/TURNIERE-98
Add workaround for shoulda-matchers#1067
This commit is contained in:
commit
ed1314c0da
|
|
@ -3,10 +3,6 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe Tournament, type: :model do
|
RSpec.describe Tournament, type: :model do
|
||||||
before do
|
|
||||||
@tournament = create(:tournament)
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'validation' do
|
describe 'validation' do
|
||||||
it { should validate_presence_of :name }
|
it { should validate_presence_of :name }
|
||||||
it { should validate_presence_of :code }
|
it { should validate_presence_of :code }
|
||||||
|
|
@ -19,11 +15,13 @@ RSpec.describe Tournament, type: :model do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'initialization' do
|
describe 'initialization' do
|
||||||
|
subject { create(:tournament) }
|
||||||
|
|
||||||
it 'should have a code' do
|
it 'should have a code' do
|
||||||
expect(@tournament.code.length).to be(6)
|
expect(subject.code.length).to be(6)
|
||||||
end
|
end
|
||||||
it 'should be public' do
|
it 'should be public' do
|
||||||
expect(@tournament.public).to be(true)
|
expect(subject.public).to be(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue