johnbender-rquery 0.2.0 → 0.3.0

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.
@@ -1,23 +0,0 @@
1
-
2
- require File.expand_path(File.dirname(__FILE__) + "/../lib/rquery.rb")
3
-
4
- describe RQuery::Declarations do
5
-
6
- before(:all) do
7
- RQuery.adapter = RQuery::Adapters::Sqlite
8
- end
9
-
10
- after(:each) do
11
- RQuery::Serializers::Operations.clear
12
- end
13
-
14
- it "any symbol should respond to is, is_not, in, between, from, and contains methods" do
15
- :foo.respond_to?(:is).should == true
16
- :foo.respond_to?(:is_not).should == true
17
- :foo.respond_to?(:in).should == true
18
- :foo.respond_to?(:from).should == true
19
- :foo.respond_to?(:between).should == true
20
- :foo.respond_to?(:from).should == true
21
- end
22
-
23
- end
@@ -1,34 +0,0 @@
1
-
2
- require File.expand_path(File.dirname(__FILE__) + "/../lib/rquery.rb")
3
-
4
- describe RQuery::Serializers do
5
-
6
- before(:all) do
7
- RQuery.use_symbols
8
- end
9
-
10
- it "Object.is should define ==, <, <=, >, >=, in, and between" do
11
- :foo.is.respond_to?(:==).should == true
12
- :foo.is.respond_to?(:<).should == true
13
- :foo.is.respond_to?(:<=).should == true
14
- :foo.is.respond_to?(:>).should == true
15
- :foo.is.respond_to?(:>=).should == true
16
- :foo.is.respond_to?(:in).should == true
17
- :foo.is.respond_to?(:between).should == true
18
- end
19
-
20
- it "Object.is_not should define == and in" do
21
- :foo.is_not.respond_to?(:==).should == true
22
- :foo.is_not.respond_to?(:in).should == true
23
- :foo.is_not.respond_to?(:between).should == true
24
- end
25
-
26
- it "Object.is_not should not redefine <, <=, >, >= in the same way that .is did" do
27
- lambda {:foo.is_not.send(:<)}.should raise_error(ArgumentError)
28
- lambda {:foo.is_not.send(:<=)}.should raise_error(ArgumentError)
29
- lambda {:foo.is_not.send(:>)}.should raise_error(ArgumentError)
30
- lambda {:foo.is_not.send(:>=)}.should raise_error(ArgumentError)
31
- end
32
-
33
-
34
- end