Sha256: ad983f50fe19e9eb26505167c97f140e47fdd6ca8810373595b7b41c7b3a5425

Contents?: true

Size: 728 Bytes

Versions: 2

Compression:

Stored size: 728 Bytes

Contents

require 'spec_helper'

module ActionDispatch::Routing
  
  describe Mapper do
    context "#governate" do
      
      before do
        @plugin = Governor::Plugin.new('test')
        @plugin.add_child_resource('test', :some_option => 'value')
        Governor::PluginManager.register @plugin
      end
      
      it "doesn't alter a plugin's options" do
        Rails.application.reload_routes!
        
        @plugin.resources[:child_resources].should == {'test' => {:some_option => 'value'}}
      end
      
      after do
        # reload routes to undo what we've done
        Governor::PluginManager.remove_plugin(@plugin).should == @plugin
        Rails.application.reload_routes!
      end
      
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
governor-0.2.1 spec/action_dispatch/routing/mapper_spec.rb
governor-0.2.0 spec/action_dispatch/routing/mapper_spec.rb