1
0
Fork 0
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:
James Cox 2014-12-29 11:38:13 -05:00
parent 33d27dcd3e
commit 9ce54b5557
3 changed files with 14 additions and 1 deletions

View file

@ -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

View file

@ -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.

View file

@ -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 }