Skip to content

Commit

Permalink
Add some activity specs (and remove two pending specs).
Browse files Browse the repository at this point in the history
  • Loading branch information
ugisozols committed Oct 28, 2011
1 parent 1c6eb24 commit adbf1c1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
23 changes: 21 additions & 2 deletions core/spec/lib/refinery/activity_spec.rb
Expand Up @@ -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
Expand All @@ -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
8 changes: 0 additions & 8 deletions core/spec/lib/refinery/plugin_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit adbf1c1

Please sign in to comment.