spec/show_model_spec.rb in pry-rails-0.3.2 vs spec/show_model_spec.rb in pry-rails-0.3.3

- old
+ new

@@ -1,13 +1,10 @@ # encoding: UTF-8 require 'spec_helper' describe "show-models" do - before { Pry.color = false } - after { Pry.color = true } - it "should print one ActiveRecord model" do output = mock_pry('show-model Beer', 'exit-all') expected = <<MODEL Beer @@ -27,16 +24,17 @@ it "should print one Mongoid model" do output = mock_pry('show-model Artist', 'exit-all') expected = <<MODEL Artist - _id: Moped::BSON::ObjectId + _id: BSON::ObjectId name: String embeds_one :beer (validate) embeds_many :instruments (validate) MODEL output.gsub! /^ *_type: String\n/, '' # mongoid 3.0 and 3.1 differ on this + output.gsub! /Moped::BSON/, 'BSON' # mongoid 3 and 4 differ on this output.must_equal expected end end it "should print an error if the model doesn't exist" do