artisan-repository 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ shared_examples "change repository" do
15
15
 
16
16
  it "orders by created_at project" do
17
17
  second = repo.create_project_change(:source_id => 3, :user_id => 2, :event => "second", :project_id => 123, :created_at => Time.now)
18
- first = repo.create_project_change(:source_id => 1, :user_id => 2, :event => "first", :project_id => 123, :created_at => (Time.now - 25))
18
+ first = repo.create_project_change(:source_id => 1, :user_id => 2, :event => "first", :project_id => 123, :created_at => (Time.now - 25 ))
19
19
 
20
20
  repo.find_all_by_project_id(123).map(&:event).should == ["second", "first"]
21
21
  end
@@ -1,13 +1,13 @@
1
1
  require 'artisan/repository'
2
2
 
3
- def destroy
4
- repo.destroy_all
5
- user_repo.destroy_all
6
- end
7
-
8
- shared_examples "project repository" do
9
- let (:repo) { described_class.new }
10
- let (:user_repo) { Artisan::Repository.user }
3
+ shared_examples "project repository" do
4
+ let!(:repo) { described_class.new }
5
+ let!(:user_repo) { Artisan::Repository.user }
6
+
7
+ def destroy
8
+ repo.destroy_all
9
+ user_repo.destroy_all
10
+ end
11
11
 
12
12
  before(:each) do
13
13
  destroy
@@ -114,7 +114,7 @@ shared_examples "project repository" do
114
114
 
115
115
  describe "membership" do
116
116
  let(:project) { repo.create(:name => "A") }
117
- let(:user) { user_repo.create(:name => "Doug", :email => "doug!@bradbury.com", :password => "ilikeplanes", :full_name => "Doug Bradbury", :login => "Doug")}
117
+ let(:user) { user_repo.create(:name => "Doug", :email => "doug!@bradbury.com", :full_name => "Doug Bradbury", :login => "Doug")}
118
118
 
119
119
  it "adds members to the project" do
120
120
  repo.add_member(project, user, false)
@@ -3,7 +3,7 @@ require 'artisan/repository'
3
3
  shared_examples "story repository" do
4
4
  let (:repo) { described_class.new }
5
5
  let (:project) { Artisan::Repository.project.create(:name => "proj") }
6
- let (:user) { Artisan::Repository.user.create(:full_name => "Test User", :login => "user", :email => "test@example.com", :password => "sample") }
6
+ let (:user) { Artisan::Repository.user.create(:full_name => "Test User", :login => "user", :email => "test@example.com") }
7
7
 
8
8
  before(:each) do
9
9
  repo.destroy_all
@@ -1,6 +1,6 @@
1
1
  shared_examples "user repository" do
2
2
  let(:repo) {described_class.new}
3
- let(:attrs) { { :full_name => "test user", :email => "test@example.com", :password => "secret", :login => "tester" } }
3
+ let(:attrs) { { :full_name => "test user", :email => "test@example.com", :login => "tester" } }
4
4
  let(:user) { repo.create(attrs) }
5
5
 
6
6
  before do
@@ -32,23 +32,17 @@ shared_examples "user repository" do
32
32
  end
33
33
 
34
34
  it "validates unique login" do
35
- user = repo.create(:email => "test1@example.com", :login => "login", :password => "pass", :password_confirmation => "pass", :full_name => "some name")
36
- lambda { repeat = repo.create(:email => "test2@example.com", :login => "login", :password => "pass", :password_confirmation => "pass", :full_name => "some name") }.should raise_exception(Artisan::RecordNotValid)
37
- end
38
-
39
- it "updates the password" do
40
- user = repo.create(:email => "test1@example.com", :login => "login", :password => "pass", :password_confirmation => "pass", :full_name => "some name")
41
- user.update_attributes(:password => "123456", :password_confirmation => "123456")
42
- user.password.should == "123456"
35
+ user = repo.create(:email => "test1@example.com", :login => "login", :full_name => "some name")
36
+ lambda { repeat = repo.create(:email => "test2@example.com", :login => "login", :full_name => "some name") }.should raise_exception(Artisan::RecordNotValid)
43
37
  end
44
38
 
45
39
  it "validates unique login...case sensitive style" do
46
- user = repo.create(:email => "test1@example.com", :login => "login", :password => "pass", :password_confirmation => "pass", :full_name => "some name")
47
- lambda { repeat = repo.create(:email => "test2@example.com", :login => "Login", :password => "pass", :password_confirmation => "pass", :full_name => "some name") }.should raise_exception(Artisan::RecordNotValid)
40
+ user = repo.create(:email => "test1@example.com", :login => "login", :full_name => "some name")
41
+ lambda { repeat = repo.create(:email => "test2@example.com", :login => "Login", :full_name => "some name") }.should raise_exception(Artisan::RecordNotValid)
48
42
  end
49
43
 
50
44
  it "gets the user's stories" do
51
- user = repo.create(:email => "test1@example.com", :login => "login", :password => "pass", :password_confirmation => "pass", :full_name => "some name")
45
+ user = repo.create(:email => "test1@example.com", :login => "login", :full_name => "some name")
52
46
 
53
47
  project = Artisan::Repository.project.create
54
48
  iteration = Artisan::Repository.iteration.create(:project => project)
metadata CHANGED
@@ -1,22 +1,27 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: artisan-repository
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.0.5
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - 8th Light Craftsmen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-13 00:00:00.000000000 Z
12
+
13
+ date: 2012-10-13 00:00:00 Z
13
14
  dependencies: []
15
+
14
16
  description: An interface to the Artisan persistance layer
15
17
  email: paul@8thlight.com
16
18
  executables: []
19
+
17
20
  extensions: []
21
+
18
22
  extra_rdoc_files: []
19
- files:
23
+
24
+ files:
20
25
  - lib/artisan/repository.rb
21
26
  - lib/artisan/shared_examples/change_examples.rb
22
27
  - lib/artisan/shared_examples/future_user_examples.rb
@@ -26,26 +31,33 @@ files:
26
31
  - lib/artisan/shared_examples/user_examples.rb
27
32
  homepage: http://8thlight.com
28
33
  licenses: []
34
+
29
35
  post_install_message:
30
36
  rdoc_options: []
31
- require_paths:
37
+
38
+ require_paths:
32
39
  - lib
33
- required_ruby_version: !ruby/object:Gem::Requirement
40
+ required_ruby_version: !ruby/object:Gem::Requirement
34
41
  none: false
35
- requirements:
36
- - - ! '>='
37
- - !ruby/object:Gem::Version
38
- version: '0'
39
- required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: -3174594710508127497
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
50
  none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
44
- version: '0'
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
45
55
  requirements: []
56
+
46
57
  rubyforge_project:
47
- rubygems_version: 1.8.21
58
+ rubygems_version: 1.8.24
48
59
  signing_key:
49
60
  specification_version: 3
50
61
  summary: Artisan RepositorySpec
51
62
  test_files: []
63
+