camcorder 0.0.2 → 0.0.3

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: cf6593d537d37f4630e5e39874ae2431c22bf955
4
- data.tar.gz: 69afb405dd9c9d6171fba3e4ccf5502c8e352d44
3
+ metadata.gz: 89096f4a1f052334ca47a32755400159a4e17db0
4
+ data.tar.gz: bd317603915f7fa901529dd48ef09a1361d81370
5
5
  SHA512:
6
- metadata.gz: 2b4d58e302d98fd9374afa2aeae275d73509c6ac32b18f63b8919d6343f85fd015a0f1abb72764e678d70ffafa88bbc86dc2e270bb3891afd216fd7a79517abf
7
- data.tar.gz: 4268ffb55fee733246ce27cc38578ae35f26f03f3f504c7f484fb369ee3f7b4bd35559a40200859bdb696c807396bc8f5f354f84109c35236bfb0b6ee7444533
6
+ metadata.gz: a9836f7c0991832dd8612b42a45cace1ff75989bb9c888450d7ffc4ce64cdbed130b4f0b134d61056cd03b6203dbde638d02fed4c87c8966ced3bb1d5ea64d24
7
+ data.tar.gz: afefa67a4185e008672c521d3fa2ee8a4740e34c5af9a44d4c2b7eb26a883feadd9aeeb2866319dc8f41bc7c979a6ac377767f12f19724205f5f09d128e8895f
data/README.md CHANGED
@@ -69,7 +69,7 @@ In your `spec_helper.rb` file:
69
69
  ```ruby
70
70
  require 'camcorder/rspec'
71
71
 
72
- Camcorder.configuration.recordings_dir = 'spec/recordings'
72
+ Camcorder.config.recordings_dir = 'spec/recordings'
73
73
  ```
74
74
 
75
75
  ## Contributing
@@ -2,7 +2,7 @@ require 'yaml'
2
2
  require 'camcorder/recording'
3
3
 
4
4
  module Camcorder
5
-
5
+
6
6
  class Recorder
7
7
 
8
8
  attr_reader :recordings
@@ -52,7 +52,7 @@ module Camcorder
52
52
  @changed = true
53
53
  if recordings.has_key?(key)
54
54
  if recordings[key] != recording
55
- raise RecordingError(key)
55
+ raise RecordingError.new(key)
56
56
  end
57
57
  else
58
58
  recordings[key] = recording
@@ -1,3 +1,3 @@
1
1
  module Camcorder
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -2,17 +2,17 @@ require 'spec_helper'
2
2
 
3
3
 
4
4
  describe Camcorder::Recorder do
5
-
5
+
6
6
  subject{ Camcorder::Recorder.new(filename) }
7
-
7
+
8
8
  describe '.transaction' do
9
-
9
+
10
10
  let(:key) { 'key' }
11
-
11
+
12
12
  context 'when recording exists' do
13
-
13
+
14
14
  let(:filename) { 'spec/fixtures/should_exist.yml'}
15
-
15
+
16
16
  it 'should return recorded value' do
17
17
  subject.transaction do
18
18
  result = subject.record 'key' do
@@ -23,7 +23,7 @@ describe Camcorder::Recorder do
23
23
  expect(result).to eq('dis be da result')
24
24
  end
25
25
  end
26
-
26
+
27
27
  it 'should error on unknown key' do
28
28
  expect {
29
29
  subject.transaction do
@@ -33,13 +33,13 @@ describe Camcorder::Recorder do
33
33
  end
34
34
  }.to raise_error(Camcorder::PlaybackError)
35
35
  end
36
-
36
+
37
37
  end
38
-
38
+
39
39
  context 'when block raises' do
40
-
40
+
41
41
  let(:filename) { 'spec/fixtures/haz_errorz.yml'}
42
-
42
+
43
43
  it 'should reraise from recording' do
44
44
  expect {
45
45
  subject.transaction do
@@ -50,31 +50,31 @@ describe Camcorder::Recorder do
50
50
  end
51
51
  }.to raise_error(StandardError)
52
52
  end
53
-
53
+
54
54
  end
55
-
55
+
56
56
  context 'when no recording exists' do
57
-
57
+
58
58
  let(:filename) { 'spec/fixtures/should_not_exist.yml'}
59
-
59
+
60
60
  after do
61
61
  File.delete(filename)
62
62
  end
63
-
63
+
64
64
  it 'should create recording' do
65
-
66
- expect(File.exists?(filename)).to be_false
65
+
66
+ expect(File.exists?(filename)).to be_falsey
67
67
  subject.transaction do
68
68
  subject.record 'key' do
69
69
  'dis be da result'
70
70
  end
71
71
  end
72
- expect(File.exists?(filename)).to be_true
73
-
72
+ expect(File.exists?(filename)).to be_truthy
73
+
74
74
  end
75
-
75
+
76
76
  end
77
-
77
+
78
78
  end
79
-
79
+
80
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camcorder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gordon L. Hempton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-10 00:00:00.000000000 Z
11
+ date: 2015-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.2.0
95
+ rubygems_version: 2.2.2
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: VCR-like recording for arbitrary method invocations.