tuberack 1.0.6 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 696a3bcb324d0642ad2bc732cfe73a98d03b6b82
4
- data.tar.gz: cfe1fdf6f5e48d93219f9406aaa2ad92d74ee830
3
+ metadata.gz: c3fc014ceb324a13a80cb48a45af8eabf6308b0c
4
+ data.tar.gz: 649158475d03c72d07b371a6f5ec7714ba8539b5
5
5
  SHA512:
6
- metadata.gz: 8fac9b1ee564eaea4c64730d50eb255590f2f6023f7fe2bd0a1fc34a4208cf33ba4fc5122c347f47d4ca50dfe9a50430d63b6e51f52841a332c5c85a0a9fa0b3
7
- data.tar.gz: dadd90dc01bedc29e9bd9b97d5e8595fe77c340de8636321cb71550605243256f850c7893e9900c9fb57008a4d3b2b2729fb72552c6bb6b76ff79c0aeba06a74
6
+ metadata.gz: 159d9a9e1b0bf35184062abd8eab38cccf5df0aa2b82fa2b8c3962cd2603340b18951088a836cbbf86769e7c1507eaec6dd8fe23a644d34ee1abdc48b546d323
7
+ data.tar.gz: 12b0b0d61ee6541d12a72e06a1478584d0d7dc539daa75bfce9939a2bf3b39a8ff40349935701f63f2ae22536d1cafe7a41dea0631ac32e65a08d587f6631a2a
@@ -11,7 +11,7 @@ module Tuberack
11
11
  current_user
12
12
  end
13
13
 
14
- def ability
14
+ def cancan_ability
15
15
  @ability = Object.new
16
16
  @ability.extend(CanCan::Ability)
17
17
  @controller.stubs(:current_user).returns(current_user)
@@ -19,12 +19,12 @@ module Tuberack
19
19
  end
20
20
 
21
21
  def can object
22
- ability unless defined? @ability
22
+ cancan_ability unless defined? @ability
23
23
  @ability.can :manage, object
24
24
  end
25
25
 
26
26
  def cannot object
27
- ability unless defined? @ability
27
+ cancan_ability unless defined? @ability
28
28
  @ability.cannot :manage, object
29
29
  end
30
30
  end
@@ -1,5 +1,5 @@
1
1
  # MiniTest for Rails
2
- require 'minitest/spec'
2
+ require 'minitest-spec-rails'
3
3
  require 'minitest/pride'
4
4
 
5
5
  # Shoulda matchers
@@ -1,37 +1,14 @@
1
1
  # Default and model tests
2
2
  class ActiveSupport::TestCase
3
- extend MiniTest::Spec::DSL
4
-
5
3
  include FactoryGirl::Syntax::Methods
6
-
7
- class << self
8
- remove_method :describe
9
- end
10
-
11
- register_spec_type self do |desc|
12
- desc < ActiveRecord::Base if desc.is_a? Class
13
- end
14
- end
15
-
16
- # View tests
17
- class ActionView::TestCase
18
- register_spec_type(/Helper/, self)
19
- end
20
-
21
- # Controller tests
22
- class ActionController::TestCase
23
- register_spec_type(/Controller$/, self)
24
4
  end
25
5
 
26
- # Cell tests
27
- class Cell::TestCase
28
- register_spec_type(/Cell$/, self)
29
- end if defined? Cell
6
+ Minitest::Spec.register_spec_type(/Cell$/, Cell::TestCase) if defined? Cell
7
+ Minitest::Spec.register_spec_type(/Integration$|Feature$/, ActionDispatch::IntegrationTest)
30
8
 
31
9
  # Integration tests
32
10
  class ActionDispatch::IntegrationTest
33
11
  include RailsAdmin::Engine.routes.url_helpers if defined? RailsAdmin
34
- register_spec_type(/Feature$/, self)
35
12
  end
36
13
 
37
14
  # Switching to Warden test mode
@@ -1,3 +1,3 @@
1
1
  module Tuberack
2
- VERSION = "1.0.6"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tuberack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JiriKolarik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-04 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest-spec-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: capybara
57
71
  requirement: !ruby/object:Gem::Requirement