mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Allows specs to run
This commit is contained in:
parent
33d27dcd3e
commit
9ce54b5557
3 changed files with 14 additions and 1 deletions
|
@ -25,4 +25,10 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.add_development_dependency "rspec", ">= 2.6.0"
|
||||
s.add_development_dependency "fakefs", ">= 0.2.1"
|
||||
s.add_development_dependency "actionview"
|
||||
s.add_development_dependency "activerecord"
|
||||
s.add_development_dependency "activesupport"
|
||||
s.add_development_dependency "mongoid"
|
||||
s.add_development_dependency "mongo_mapper"
|
||||
s.add_development_dependency "nokogiri"
|
||||
end
|
||||
|
|
|
@ -4,6 +4,13 @@ begin
|
|||
require 'active_record'
|
||||
require 'awesome_print/ext/active_record'
|
||||
|
||||
module Rails
|
||||
def self.env
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if defined?(ActiveRecord::VERSION::MAJOR) && ActiveRecord::VERSION::MAJOR >= 2
|
||||
|
||||
# Create tableless ActiveRecord model.
|
||||
|
|
|
@ -218,7 +218,7 @@ EOS
|
|||
|
||||
it "should detect Rails::Console" do
|
||||
class IRB; end
|
||||
class Rails; class Console; end; end
|
||||
module Rails; class Console; end; end
|
||||
expect(AwesomePrint.console?).to eq(true)
|
||||
expect(AwesomePrint.rails_console?).to eq(true)
|
||||
Object.instance_eval{ remove_const :IRB }
|
||||
|
|
Loading…
Reference in a new issue