Tidying up spec, remove unnecessary assignments to local variable
This commit is contained in:
parent
ec7848b783
commit
aabf097e88
|
@ -14,7 +14,7 @@ describe CouchRest::Design do
|
||||||
describe "with an unsaved view" do
|
describe "with an unsaved view" do
|
||||||
before(:each) do
|
before(:each) do
|
||||||
@des = CouchRest::Design.new
|
@des = CouchRest::Design.new
|
||||||
method = @des.view_by :name
|
@des.view_by :name
|
||||||
end
|
end
|
||||||
it "should accept a name" do
|
it "should accept a name" do
|
||||||
@des.name = "mytest"
|
@des.name = "mytest"
|
||||||
|
@ -31,7 +31,7 @@ describe CouchRest::Design do
|
||||||
describe "saving" do
|
describe "saving" do
|
||||||
before(:each) do
|
before(:each) do
|
||||||
@des = CouchRest::Design.new
|
@des = CouchRest::Design.new
|
||||||
method = @des.view_by :name
|
@des.view_by :name
|
||||||
@des.database = reset_test_db!
|
@des.database = reset_test_db!
|
||||||
end
|
end
|
||||||
it "should fail without a name" do
|
it "should fail without a name" do
|
||||||
|
@ -49,7 +49,7 @@ describe CouchRest::Design do
|
||||||
@db.bulk_save([{"name" => "x"},{"name" => "y"}])
|
@db.bulk_save([{"name" => "x"},{"name" => "y"}])
|
||||||
@des = CouchRest::Design.new
|
@des = CouchRest::Design.new
|
||||||
@des.database = @db
|
@des.database = @db
|
||||||
method = @des.view_by :name
|
@des.view_by :name
|
||||||
end
|
end
|
||||||
it "should by queryable when it's saved" do
|
it "should by queryable when it's saved" do
|
||||||
@des.name = "mydesign"
|
@des.name = "mydesign"
|
||||||
|
@ -99,7 +99,7 @@ describe CouchRest::Design do
|
||||||
@db = reset_test_db!
|
@db = reset_test_db!
|
||||||
@des = CouchRest::Design.new
|
@des = CouchRest::Design.new
|
||||||
@des.name = "test"
|
@des.name = "test"
|
||||||
method = @des.view_by :name, :descending => true
|
@des.view_by :name, :descending => true
|
||||||
@des.database = @db
|
@des.database = @db
|
||||||
@des.save
|
@des.save
|
||||||
@db.bulk_save([{"name" => "a"},{"name" => "z"}])
|
@db.bulk_save([{"name" => "a"},{"name" => "z"}])
|
||||||
|
@ -123,7 +123,7 @@ describe CouchRest::Design do
|
||||||
@db = reset_test_db!
|
@db = reset_test_db!
|
||||||
@des = CouchRest::Design.new
|
@des = CouchRest::Design.new
|
||||||
@des.name = "test"
|
@des.name = "test"
|
||||||
method = @des.view_by :name, :age
|
@des.view_by :name, :age
|
||||||
@des.database = @db
|
@des.database = @db
|
||||||
@des.save
|
@des.save
|
||||||
@db.bulk_save([{"name" => "a", "age" => 2},
|
@db.bulk_save([{"name" => "a", "age" => 2},
|
||||||
|
|
Loading…
Reference in a new issue