spec/lib/locomotive/plugin_spec.rb in locomotive_plugins-1.0.0.beta3 vs spec/lib/locomotive/plugin_spec.rb in locomotive_plugins-1.0.0.beta4
- old
+ new
@@ -12,9 +12,16 @@
it 'should call custom initialization methods' do
@plugin.custom_attribute.should == 'Value'
end
+ it 'should call the gven block before custom initialization methods' do
+ @plugin = MyPlugin.new(@config) do |obj|
+ obj.custom_attribute.should be_nil
+ end
+ @plugin.custom_attribute.should_not be_nil
+ end
+
it 'should store a list of before_filters' do
@plugin.before_filters.count.should == 2
@plugin.before_filters[0].should == :my_method1
@plugin.before_filters[1].should == :my_method2
end