Skip to content

Commit

Permalink
Remove rspec-its gem from dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jkojro committed Mar 12, 2019
1 parent 140cc33 commit 57a5d4d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion common_spree_dependencies.rb
Expand Up @@ -25,7 +25,6 @@
gem 'factory_bot_rails', '~> 4.8'
gem 'rspec-activemodel-mocks', '~> 1.0'
gem 'rspec-collection_matchers'
gem 'rspec-its'
gem 'rspec-rails', '~> 3.7.2'
gem 'rspec-retry'
gem 'rspec_junit_formatter'
Expand Down
12 changes: 4 additions & 8 deletions core/spec/models/spree/payment_spec.rb
Expand Up @@ -887,29 +887,25 @@
end

describe '#editable?' do
subject { payment }

before do
subject.state = state
end
before { payment.state = state }

context "when the state is 'checkout'" do
let(:state) { 'checkout' }

its(:editable?) { is_expected.to be(true) }
it { expect(payment.editable?).to eq(true) }
end

context "when the state is 'pending'" do
let(:state) { 'pending' }

its(:editable?) { is_expected.to be(true) }
it { expect(payment.editable?).to eq(true) }
end

%w[processing completed failed void invalid].each do |state|
context "when the state is '#{state}'" do
let(:state) { state }

its(:editable?) { is_expected.to be(false) }
it { expect(payment.editable?).to eq(false) }
end
end
end
Expand Down
5 changes: 2 additions & 3 deletions core/spec/support/concerns/default_price.rb
Expand Up @@ -20,9 +20,8 @@
end

describe '#default_price' do
subject { instance.default_price }
it { expect(instance.default_price.class).to eql Spree::Price }

its(:class) { is_expected.to eql Spree::Price }
it 'delegates price' do
expect(instance.default_price).to receive(:price)
instance.price
Expand All @@ -34,5 +33,5 @@
end
end

its(:has_default_price?) { is_expected.to be_truthy }
it { expect(instance.has_default_price?).to be_truthy }
end
4 changes: 4 additions & 0 deletions guides/src/content/release_notes/4_0_0.md
Expand Up @@ -72,6 +72,10 @@ Please review each of the noteworthy changes to ensure your customizations or ex

[Janusz Kojro](https://github.com/spree/spree/pull/9285)

- Droped rspec-its dependency

[Janusz Kojro](https://github.com/spree/spree/pull/9292)

## Full Changelog

You can view the full changes using [Github Compare](https://github.com/spree/spree/compare/3-7-stable...master).

0 comments on commit 57a5d4d

Please sign in to comment.