diff --git a/core/spec/lib/refinery/activity_spec.rb b/core/spec/lib/refinery/activity_spec.rb index 843d4568ae..2f1f409aef 100644 --- a/core/spec/lib/refinery/activity_spec.rb +++ b/core/spec/lib/refinery/activity_spec.rb @@ -8,7 +8,7 @@ class Z end end end - @activity = Refinery::Activity.new(:class_name => "Y::Y::Z", :url_prefix => "rush") + @activity = Refinery::Activity.new(:class_name => "Y::Y::Z") end describe "#base_class_name" do @@ -17,9 +17,28 @@ class Z end end + describe "#klass" do + it "returns class constant" do + @activity.klass.should == Y::Y::Z + end + end + + describe "#url_prefix" do + it "returns edit_ by default" do + @activity.url_prefix.should == "edit_" + end + + it "returns user specified prefix" do + @activity.url_prefix = "testy" + @activity.url_prefix.should == "testy_" + @activity.url_prefix = "testy_" + @activity.url_prefix.should == "testy_" + end + end + describe "#url" do it "should return the url" do - @activity.url.should == "rush_refinery_admin_z_path" + @activity.url.should == "edit_refinery_admin_z_path" end end end diff --git a/core/spec/lib/refinery/plugin_spec.rb b/core/spec/lib/refinery/plugin_spec.rb index 7812b1046d..b601c58dab 100644 --- a/core/spec/lib/refinery/plugin_spec.rb +++ b/core/spec/lib/refinery/plugin_spec.rb @@ -52,14 +52,6 @@ module Refinery end end - describe '#activity' do - pending - end - - describe '#activity=' do - pending - end - describe '#pathname' do it 'should be set by default' do plugin.pathname.should_not == nil