selleo-controller_tests 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWIwOTJmY2Q4MjAwM2FiYjAwYmJhYjE2NDNiNGNiNWNjZTIzOGM0Zg==
4
+ ZDg0NDJhNzJhYzAzOWI5Y2Q2NTVlODRlMDNhYjI4Yzc2ZDAyMjI3Yg==
5
5
  data.tar.gz: !binary |-
6
- ZGY4OTFhMDk4NjhmZDczMTk1YzEyZmVhYmRlYWQ0MGY4MDExN2YzOQ==
6
+ Mjg5ZGViMjNiMGQ5MTEyZmM3YzFjNzQ5NmQ4NTRlNjkwNzcxMDhlMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDIyZjc4M2E2N2U3Y2UwMmFhYmM5ZTg2MDczNzc2YmI1NmNkYTk1ZjVkMjhh
10
- Y2Y0ZjljNTQ2MDBkYWQwZGQxY2ZiMWNiYzVkNDJhMDdiNjU1MTRiYjFkMzNj
11
- MWY5MDQwOWI3NDZhMDE1NzVhOTg5MDRmYmE3OGZmZmY2ODhkNWQ=
9
+ MTYyMGRiYzdjMDQwM2UwODJhNzgzZTMyMWNiZjkzY2NiOTliM2I2NmE4ZmUy
10
+ NDdkMmI5NThhNWU3MDBlYmQ5ODYwNGEwNTJjY2U2M2Q3MmIwYjg4MjI5YTc0
11
+ NGRiNGFkZmJhMDBhZmU1ZTM4ODI0MDQ3NWRiMzlkOTk0ZGJjZGE=
12
12
  data.tar.gz: !binary |-
13
- MTU2NzYyNWFhZGMyZWUyODdhYmJjZmQ5NTZiNTNjMzZjOThmZGMzNTEwNmE5
14
- YmZhZTIzNTY4OTdjZjdjNWUxMTNkOGJhZTJmYjlmOTJiZjZjYjY2M2U3YzU5
15
- OTQ0ZmI4OWYxNWU1NWJhNmI1NTdkY2U0NmQzNTVmODg3YmU3NDk=
13
+ OTNkZDMxMGUxN2E5ZDdkZTdlMWVlMDA0MGMwY2NhN2U5YjYxYjExZWEwNTBj
14
+ YzY1ZDhlYzdiYWJiNmExNzQxYzE4OTM0OTcwNjBkMDBjZjI3YTY5YjVhMjQz
15
+ MmNlYmU1ZDFmMzdhOTgxYTA3OTcwYTY0MzUyMGM4M2M0ZDg5OTU=
@@ -0,0 +1,3 @@
1
+ shared_examples_for 'an action redirecting to' do |path|
2
+ it { expect(call_request).to redirect_to(instance_exec(&path)) }
3
+ end
@@ -0,0 +1,5 @@
1
+ shared_examples 'an action redirecting to back' do
2
+ before { request.env['HTTP_REFERER'] = '/previous_path' }
3
+
4
+ it { expect(call_request).to redirect_to('/previous_path') }
5
+ end
@@ -0,0 +1,12 @@
1
+ shared_examples_for 'an action rendering view' do
2
+ let(:view) do
3
+ parent = self.class.parent
4
+ if parent.description.first == '#'
5
+ parent.description[/\w+/]
6
+ else
7
+ parent.parent.description[/\w+/]
8
+ end
9
+ end
10
+
11
+ it { expect(call_request).to render_template(view) }
12
+ end
@@ -1,5 +1,5 @@
1
1
  module Selleo
2
2
  module ControllerTests
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selleo-controller_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - stevo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-02-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Shared examples for controller tests
14
14
  email:
@@ -20,6 +20,9 @@ files:
20
20
  - lib/selleo-controller_tests/support/controller_macros.rb
21
21
  - lib/selleo-controller_tests/support/shared_examples/controllers/action_creating_object.rb
22
22
  - lib/selleo-controller_tests/support/shared_examples/controllers/action_destroying_object.rb
23
+ - lib/selleo-controller_tests/support/shared_examples/controllers/action_redirecting_to.rb
24
+ - lib/selleo-controller_tests/support/shared_examples/controllers/action_redirecting_to_back.rb
25
+ - lib/selleo-controller_tests/support/shared_examples/controllers/action_rendering_view.rb
23
26
  - lib/selleo-controller_tests/support/shared_examples/controllers/action_updating_object.rb
24
27
  - lib/selleo-controller_tests/support/shared_examples/controllers/handled_with_service_object.rb
25
28
  - lib/selleo-controller_tests/support/xhr_persistence.rb