Skip to content
Browse files

Merge pull request #72 from thoughtbot/mm-mattr_accessor-requiring

lib/high_voltage.rb should be able to be required.
  • Loading branch information...
2 parents fc4fa60 + 95003c4 commit 42a59e5b5209e2cad0bbbe5069f01d30d8f59b2a @linduxed linduxed committed
Showing with 11 additions and 1 deletion.
  1. +1 −0 lib/high_voltage.rb
  2. +5 −1 spec/high_voltage_spec.rb
  3. +5 −0 spec/minimal_spec_helper.rb
View
1 lib/high_voltage.rb
@@ -3,6 +3,7 @@
require 'high_voltage/page_finder'
require 'high_voltage/route_drawers/default'
require 'high_voltage/route_drawers/root'
+require 'active_support/core_ext/module/attribute_accessors'
module HighVoltage
mattr_accessor :layout
View
6 spec/high_voltage_spec.rb
@@ -1,7 +1,11 @@
-require 'spec_helper'
+require 'minimal_spec_helper'
describe HighVoltage do
it 'should be valid' do
HighVoltage.should be_a(Module)
end
+
+ it 'should be loadable without preloading rails' do
+ expect { require 'high_voltage' }.not_to raise_error
+ end
end
View
5 spec/minimal_spec_helper.rb
@@ -0,0 +1,5 @@
+RSpec.configure do |config|
+ require 'rspec/expectations'
+ config.include RSpec::Matchers
+ config.mock_with :rspec
+end

0 comments on commit 42a59e5

Please sign in to comment.
Something went wrong with that request. Please try again.