commented out spec for fm:generate app
This commit is contained in:
parent
dcef68e725
commit
b28e40bb96
1 changed files with 31 additions and 31 deletions
|
@ -24,37 +24,37 @@ describe CouchRest::FileManager do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe CouchRest::FileManager, "generating an app" do
|
# describe CouchRest::FileManager, "generating an app" do
|
||||||
before(:all) do
|
# before(:all) do
|
||||||
@appdir = FIXTURE_PATH + '/couchapp/template-app'
|
# @appdir = FIXTURE_PATH + '/couchapp/template-app'
|
||||||
`rm -rf #{@appdir}`
|
# `rm -rf #{@appdir}`
|
||||||
`mkdir -p #{@appdir}`
|
# `mkdir -p #{@appdir}`
|
||||||
CouchRest::FileManager.generate_app(@appdir)
|
# CouchRest::FileManager.generate_app(@appdir)
|
||||||
end
|
# end
|
||||||
it "should create an attachments directory" do
|
# it "should create an attachments directory" do
|
||||||
Dir["#{@appdir}/*"].select{|x|x =~ /_attachments/}.length.should == 1
|
# Dir["#{@appdir}/*"].select{|x|x =~ /_attachments/}.length.should == 1
|
||||||
end
|
# end
|
||||||
it "should create a views directory" do
|
# it "should create a views directory" do
|
||||||
Dir["#{@appdir}/*"].select{|x|x =~ /views/}.length.should == 1
|
# Dir["#{@appdir}/*"].select{|x|x =~ /views/}.length.should == 1
|
||||||
end
|
# end
|
||||||
it "should create a foo directory" do
|
# it "should create a foo directory" do
|
||||||
Dir["#{@appdir}/*"].select{|x|x =~ /foo/}.length.should == 1
|
# Dir["#{@appdir}/*"].select{|x|x =~ /foo/}.length.should == 1
|
||||||
end
|
# end
|
||||||
it "should create index.html" do
|
# it "should create index.html" do
|
||||||
html = File.open("#{@appdir}/_attachments/index.html").read
|
# html = File.open("#{@appdir}/_attachments/index.html").read
|
||||||
html.should match(/DOCTYPE/)
|
# html.should match(/DOCTYPE/)
|
||||||
end
|
# end
|
||||||
it "should create bar.txt" do
|
# it "should create bar.txt" do
|
||||||
html = File.open("#{@appdir}/foo/bar.txt").read
|
# html = File.open("#{@appdir}/foo/bar.txt").read
|
||||||
html.should match(/Couchapp will/)
|
# html.should match(/Couchapp will/)
|
||||||
end
|
# end
|
||||||
it "should create an example view" do
|
# it "should create an example view" do
|
||||||
map = File.open("#{@appdir}/views/example/map.js").read
|
# map = File.open("#{@appdir}/views/example/map.js").read
|
||||||
map.should match(/function\(doc\)/)
|
# map.should match(/function\(doc\)/)
|
||||||
reduce = File.open("#{@appdir}/views/example/reduce.js").read
|
# reduce = File.open("#{@appdir}/views/example/reduce.js").read
|
||||||
reduce.should match(/rereduce/)
|
# reduce.should match(/rereduce/)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
||||||
describe CouchRest::FileManager, "pushing an app" do
|
describe CouchRest::FileManager, "pushing an app" do
|
||||||
before(:all) do
|
before(:all) do
|
||||||
|
|
Loading…
Add table
Reference in a new issue