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 +4 -4
- data/lib/tuberack/helpers.rb +3 -3
- data/lib/tuberack/requirements.rb +1 -1
- data/lib/tuberack/test_help.rb +2 -25
- data/lib/tuberack/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3fc014ceb324a13a80cb48a45af8eabf6308b0c
|
4
|
+
data.tar.gz: 649158475d03c72d07b371a6f5ec7714ba8539b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 159d9a9e1b0bf35184062abd8eab38cccf5df0aa2b82fa2b8c3962cd2603340b18951088a836cbbf86769e7c1507eaec6dd8fe23a644d34ee1abdc48b546d323
|
7
|
+
data.tar.gz: 12b0b0d61ee6541d12a72e06a1478584d0d7dc539daa75bfce9939a2bf3b39a8ff40349935701f63f2ae22536d1cafe7a41dea0631ac32e65a08d587f6631a2a
|
data/lib/tuberack/helpers.rb
CHANGED
@@ -11,7 +11,7 @@ module Tuberack
|
|
11
11
|
current_user
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
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
|
-
|
22
|
+
cancan_ability unless defined? @ability
|
23
23
|
@ability.can :manage, object
|
24
24
|
end
|
25
25
|
|
26
26
|
def cannot object
|
27
|
-
|
27
|
+
cancan_ability unless defined? @ability
|
28
28
|
@ability.cannot :manage, object
|
29
29
|
end
|
30
30
|
end
|
data/lib/tuberack/test_help.rb
CHANGED
@@ -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
|
-
|
27
|
-
|
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
|
data/lib/tuberack/version.rb
CHANGED
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
|
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-
|
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
|