Skip to content

Commit

Permalink
Reduce amount of deprecation output.
Browse files Browse the repository at this point in the history
  • Loading branch information
lacostej committed Nov 22, 2023
1 parent 15654ef commit 56c0438
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spaceship/spec/tunes/device_type_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
describe Spaceship::Tunes::DeviceType do
describe "type identifiers" do
before(:each) do
# let's catch those calls to avoid polluting the output
# Note: warning has a different signature in newer versions of ruby
allow(Warning).to receive(:warn).with(/Spaceship::Tunes::DeviceType has been deprecated./)
allow(Warning).to receive(:warn).with(/Spaceship::Tunes::DeviceType has been deprecated./, {:category=>nil})
end

it "should be checkable using singleton functions" do
expect(Spaceship::Tunes::DeviceType.exists?("iphone6")).to be_truthy
end
Expand Down Expand Up @@ -38,8 +45,9 @@
'desktop'
]

types = Spaceship::Tunes::DeviceType.types
old_types.each do |identifier|
expect(Spaceship::Tunes::DeviceType.types).to include(identifier)
expect(types).to include(identifier)
end
end
end
Expand Down

0 comments on commit 56c0438

Please sign in to comment.