--
You received this message because you are subscribed to the Google Groups "CouchRest" group.
To post to this group, send email to couc...@googlegroups.com.
To unsubscribe from this group, send email to couchrest+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/couchrest?hl=en.
Thank you so much for your help.
About the new Beta, I tried to use it on my dev box, but it need the
couchrest version 1.1.0.pre2 and it break all my tests every time that
I call database.recreate! I get a RestClient::ResourceNotFound. Thus,
I back to use the couchrest_model version 1.0.0 and couchrest 1.0.2.
Att,
Pablo Lacerda de Miranda
Software Engineer
Ci&T - Campinas/Brazil
pablol...@gmail.com
+55 11 8701-1086
About the new Beta, I tried to use it on my dev box, but it need the
couchrest version 1.1.0.pre2 and it break all my tests every time that
I call database.recreate! I get a RestClient::ResourceNotFound.
describe Subdomain do
before(:all) do
@database = CouchServer.default_database
end
after(:all) do
@database.delete!
end
before(:each) do
Subdomain.use_database @database
@attr = { :name => "teste", :responsable => "Pablo Lacerda",
:email => "pablol...@gmail.com", :password => "password",
:password_confirmation => "password" }
end
after(:each) do
@database.recreate!
end
it "should create a new instance with valid attributes" do
Subdomain.create!(@attr)
end
it "should have a name" do
@attr.merge!(:name => "")
subdomain = Subdomain.new(@attr)
subdomain.should_not be_valid
end
end
In the first test "should create a new instance with valid attributes" pass,
but on the second test "should have a name" I get the error like bellow:
1) Subdomain should have a name
Failure/Error: subdomain.should_not be_valid
RestClient::ResourceNotFound:
404 Resource Not Found
# ./spec/models/subdomain_spec.rb:28:in `block (2 levels) in <top
(required)>'
For the two test cases I have the follow lines on couchdb log:
[Mon, 16 May 2011 23:24:05 GMT] [info] [<0.11484.14>] 127.0.0.1 - -
'PUT' /oqg-test 201
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11512.14>] 127.0.0.1 - -
'PUT' /oqg-test 412
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11524.14>] 127.0.0.1 - -
'GET' /oqg-test/_design/Subdomain 404
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11525.14>] 127.0.0.1 - -
'PUT' /oqg-test/_design/Subdomain 201
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11526.14>] 127.0.0.1 - -
'GET' /oqg-test/_design/Subdomain/_view/by_nome?key=%22%22&limit=2&include_docs=false
200
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11527.14>] 127.0.0.1 - -
'GET' /oqg-test/_design/Subdomain 200
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11538.14>] 127.0.0.1 - -
'PUT' /oqg-test/_design/Subdomain 201
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11539.14>] 127.0.0.1 - -
'GET' /oqg-test/_design/Subdomain/_view/by_email?key=%22pablolmiranda%40gmail.com%22&limit=2&include_docs=false
200
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11541.14>] Shutting down
view group server, monitored db is closing.
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11528.14>] Shutting down
view group server, monitored db is closing.
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11540.14>] 127.0.0.1 - -
'DELETE' /oqg-test 200
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11551.14>] 127.0.0.1 - -
'PUT' /oqg-test 201
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11553.14>] 127.0.0.1 - -
'PUT' /oqg-test 412
[Mon, 16 May 2011 23:24:09 GMT] [info] [<0.11561.14>] 127.0.0.1 - -
'DELETE' /oqg-test 200
Att,
Pablo Lacerda de Miranda
Engenheiro de Software
Ci&T - Campinas
pablol...@gmail.com
+55 11 8701-1086
Thank you, this solved my problem. Know I feel comfortable to use the new beta.
Regards,
Pablo