Pr0d1r2-active_record_connectionless 1.0.0 → 1.0.1
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.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{active_record_connectionless}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Marcin Nowicki"]
|
12
|
-
s.date = %q{2009-09-
|
12
|
+
s.date = %q{2009-09-23}
|
13
13
|
s.description = %q{This gem provides connectionless active_record models useful for testing}
|
14
14
|
s.email = %q{pr0d1r2@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -18,4 +18,18 @@ describe "ActiveRecordConnectionless" do
|
|
18
18
|
}.should_not raise_error(ActiveRecord::ConnectionNotEstablished)
|
19
19
|
end
|
20
20
|
|
21
|
+
describe 'emulate_attribute' do
|
22
|
+
it 'should provide emulate_attribute method that create emulated activerecord attribute' do
|
23
|
+
ActiveRecordConnectionless.should_receive(:attr_accessor).with(:name)
|
24
|
+
ActiveRecordConnectionless.should_receive(:define_method).with("name_before_type_cast")
|
25
|
+
ActiveRecordConnectionless.emulate_attribute(:name)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should create an method which points to original attribute' do
|
29
|
+
ActiveRecordConnectionless.emulate_attribute(:name)
|
30
|
+
active_record_connectionless = ActiveRecordConnectionless.new(:name => 'name')
|
31
|
+
active_record_connectionless.name_before_type_cast.should == 'name'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
21
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Pr0d1r2-active_record_connectionless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Nowicki
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-23 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|