summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/committers_controller_spec.rb8
-rw-r--r--spec/fixtures/committerships.yml (renamed from spec/fixtures/permissions.yml)0
-rw-r--r--spec/models/committership_spec.rb (renamed from spec/models/permission_spec.rb)6
-rw-r--r--spec/models/user_spec.rb2
-rw-r--r--spec/spec_helper.rb2
5 files changed, 9 insertions, 9 deletions
diff --git a/spec/controllers/committers_controller_spec.rb b/spec/controllers/committers_controller_spec.rb
index b5054e8..c8d24a9 100644
--- a/spec/controllers/committers_controller_spec.rb
+++ b/spec/controllers/committers_controller_spec.rb
@@ -40,7 +40,7 @@ describe CommittersController, "create" do
login_as :johan
@project = projects(:johans)
@repository = repositories(:johans)
- Permission.destroy_all
+ Committership.destroy_all
end
def do_post(data)
@@ -64,9 +64,9 @@ describe CommittersController, "create" do
it "only creates the committership if user isn't already a committer" do
@repository.committers << users(:johan)
@repository.save!
- perm_count = @repository.permissions.count
+ perm_count = @repository.committerships.count
do_post(:login => "johan")
- @repository.permissions.count.should == perm_count
+ @repository.committerships.count.should == perm_count
end
it "redirects when theres no user found" do
@@ -84,7 +84,7 @@ describe CommittersController, "destroy" do
login_as :johan
@project = projects(:johans)
@repository = repositories(:johans)
- Permission.destroy_all
+ Committership.destroy_all
end
def do_delete(user_id)
diff --git a/spec/fixtures/permissions.yml b/spec/fixtures/committerships.yml
index 12b13a5..12b13a5 100644
--- a/spec/fixtures/permissions.yml
+++ b/spec/fixtures/committerships.yml
diff --git a/spec/models/permission_spec.rb b/spec/models/committership_spec.rb
index fc255f1..c242d19 100644
--- a/spec/models/permission_spec.rb
+++ b/spec/models/committership_spec.rb
@@ -1,11 +1,11 @@
require File.dirname(__FILE__) + '/../spec_helper'
-describe Permission do
+describe Committership do
before(:each) do
- @permission = Permission.new
+ @committership = Committership.new
end
it "should be valid" do
- @permission.should be_valid
+ @committership.should be_valid
end
end
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index e5111a1..8ee8eb9 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -103,7 +103,7 @@ describe User do
u.can_write_to?(repo).should == true
u.can_write_to?(repositories(:moes)).should == false
- u.permissions.destroy_all
+ u.committerships.destroy_all
u.reload
u.can_write_to?(repo).should == false
u.can_write_to?(repositories(:moes)).should == false
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 0617933..b8be9d3 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -26,7 +26,7 @@ Spec::Runner.configure do |config|
# Alternatively, if you prefer to declare them only once, you can
# do so here, like so ...
#
- config.global_fixtures = :users, :ssh_keys, :projects, :repositories, :permissions
+ config.global_fixtures = :all
#
# If you declare global fixtures, be aware that they will be declared
# for all of your examples, even those that don't use them.