loquor 0.5.2 → 0.5.3

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
- Y2Y3MTI0MTIxNjBkZTlkZjI4ZTJlNGVkN2YzZTg2YzdjZGZjYjk1Yw==
4
+ ZGMyMzdhMjI3OThmN2I0NThmZTBiZjNhZmU0ODJjODFlOWU0ZmJjZg==
5
5
  data.tar.gz: !binary |-
6
- M2JiMDM3YzI4ZDE4YWQzOGJiNTg2NGI1MjBiMDQxMjlkOWNjOGNiNQ==
6
+ OTJkMTFhNDBlNzI0NzU1ZjA4OTVmOTRkODEyMWViOWFkNjhlODY2Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjMyNTdkZDc2YjU3Mjc2NDRiZmE5YTIwNWRjZTgzMzMzMWJiZTdmZTYxMWU3
10
- NTdlMDRkMzI0OWIxNjhmNGVhNzYzZTg2M2I3ZDQxODhmNmEyMTZmNmQ4ZjM0
11
- MDgyM2Q4MWI0MGQ4NjQ3NzZhMmFkZDM5Nzg1YmZmMWU3NzUzYjc=
9
+ MTY0MWVjYjNkZGNhMWYyM2I1M2NhNjM5MDA5MDRiNTBiOGEyM2E0NGFhZjA2
10
+ MjFkNTc4ZTE5YzM5ZWYwZTJjNjY1MmZjODI3MGEyYmVjNGU3OGFlZjM1NjBm
11
+ MmUyYzBkMTEwZWViNDU5ZTM1M2ZkMzgzYzE1NWQ5YTJiOGMzMzY=
12
12
  data.tar.gz: !binary |-
13
- NzI2ZWI3MjcwMGZiZjAwMGJkZTkwZTYzODg3MWYxZjI5NjYxMDAzNmUwYTUz
14
- ZTNmZmNmM2ViMTAyODE4OWNkZmQ3YjNhZjg1OTQwOGU1OGIxNzdiYWJmYzM2
15
- ZmY4MDJlZjExMjdjMWJhZTg3NDcyM2RiNzA3MzkyZDVmZmM1M2Q=
13
+ MTU2NTY5MDNmMzdlMTEyZTFiMzg2N2I5MDE0YzRhZjE0NDNkM2M1NGNkODZi
14
+ Nzg0ZjdmNzI5MDg4NzQwMDEwODA1Mzg3MGUyOTQ1OTVhMzdkNjJjNGQxZjM5
15
+ M2E0NzZkN2E0MDVlNzE5ZjJhOGYzNjEyZGUzMGIzOTNlMzk4MTY=
@@ -1,3 +1,6 @@
1
+ # 0.5.3 / 2013-12-11
2
+ * [FEATURE] Add support for overridding stubbed responses
3
+
1
4
  # 0.5.2 / 2013-12-04
2
5
  * [FEATURE] Upgrade to latest Filum logger
3
6
 
@@ -26,8 +26,8 @@ module Loquor
26
26
  @attributes = attrs
27
27
  end
28
28
 
29
- def sample
30
- self.new(attributes)
29
+ def sample(overrides = {})
30
+ self.new(attributes.merge(overrides))
31
31
  end
32
32
 
33
33
  def find(id)
@@ -1,3 +1,3 @@
1
1
  module Loquor
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
@@ -22,6 +22,17 @@ module Loquor
22
22
  foobar.description = "Cat"
23
23
  end
24
24
  end
25
+
26
+ def test_should_return_sample_object
27
+ foobar = Foobar.sample
28
+ assert_equal "Foobar", foobar.name
29
+ end
30
+
31
+ def test_should_allow_sample_attributes_to_be_overriden
32
+ name = "Cat"
33
+ foobar = Foobar.sample(name: name)
34
+ assert_equal name, foobar.name
35
+ end
25
36
  end
26
37
  end
27
38
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loquor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Walker
@@ -193,3 +193,4 @@ test_files:
193
193
  - test/resource_mock_test.rb
194
194
  - test/resource_test.rb
195
195
  - test/test_helper.rb
196
+ has_rdoc: