setsumei 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ module Setsumei
29
29
  Build::Key.for configured_key, given: hash_keys(hash)
30
30
  end
31
31
  def configured_key
32
- options[:within] || klass
32
+ options[:within] || klass.to_s.split("::")[-1]
33
33
  end
34
34
  def hash_keys(hash)
35
35
  ( hash && hash.keys ) || []
@@ -1,3 +1,3 @@
1
1
  module Setsumei
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -82,11 +82,15 @@ module Setsumei
82
82
  let(:hash_keys) { mock "hash_keys" }
83
83
  let(:key) { "aHashKey" }
84
84
 
85
- let(:klass) { mock "a klass" }
85
+ let(:klass) { AModule::Klass }
86
86
  let(:options) { Hash.new }
87
87
  let(:collection) { Collection.of klass, options }
88
88
 
89
89
  before do
90
+ module AModule
91
+ class Klass
92
+ end
93
+ end
90
94
  hash.stub(:keys).and_return(hash_keys)
91
95
  Build::Key.stub(:for).and_return(key)
92
96
  hash[key] = []
@@ -97,7 +101,7 @@ module Setsumei
97
101
 
98
102
  it "should detect they key it should use to retreive the values from the hash" do
99
103
  hash.should_receive(:keys).and_return(hash_keys)
100
- Build::Key.should_receive(:for).with( klass, given: hash_keys).and_return(key)
104
+ Build::Key.should_receive(:for).with( "Klass", given: hash_keys).and_return(key)
101
105
  subject
102
106
  end
103
107
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: setsumei
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jon Rowe
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-27 00:00:00 +01:00
13
+ date: 2011-06-10 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency