Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 42a59e5b5209e2cad0bbbe5069f01d30d8f59b2a 2 parents fc4fa60 + 95003c4
@linduxed linduxed authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.