Skip to content

Commit

Permalink
Merge pull request #72 from thoughtbot/mm-mattr_accessor-requiring
Browse files Browse the repository at this point in the history
lib/high_voltage.rb should be able to be required.
  • Loading branch information
linduxed committed May 10, 2013
2 parents fc4fa60 + 95003c4 commit 42a59e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/high_voltage.rb
Expand Up @@ -3,6 +3,7 @@
require 'high_voltage/page_finder' require 'high_voltage/page_finder'
require 'high_voltage/route_drawers/default' require 'high_voltage/route_drawers/default'
require 'high_voltage/route_drawers/root' require 'high_voltage/route_drawers/root'
require 'active_support/core_ext/module/attribute_accessors'


module HighVoltage module HighVoltage
mattr_accessor :layout mattr_accessor :layout
Expand Down
6 changes: 5 additions & 1 deletion spec/high_voltage_spec.rb
@@ -1,7 +1,11 @@
require 'spec_helper' require 'minimal_spec_helper'


describe HighVoltage do describe HighVoltage do
it 'should be valid' do it 'should be valid' do
HighVoltage.should be_a(Module) HighVoltage.should be_a(Module)
end end

it 'should be loadable without preloading rails' do
expect { require 'high_voltage' }.not_to raise_error
end
end end
5 changes: 5 additions & 0 deletions 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.