spec/cli_spec.rb in wordless-0.2.0 vs spec/cli_spec.rb in wordless-0.2.1
- old
+ new
@@ -27,47 +27,14 @@
File.directory?('wp-content/themes/myapp').should eq true
File.exists?('wp-content/themes/myapp/index.php').should eq true
end
end
- context "#wp" do
- context "with no arguments" do
- it "downloads a copy of WordPress" do
- Wordless::CLI.start ['wp']
- File.exists?('wordpress/wp-content/index.php').should eq true
- end
-
- it "initializes a git repository" do
- Wordless::CLI.start ['wp']
- File.directory?('wordpress/.git').should eq true
- end
-
- it "doesn't leave a stray 'wordpress' directory" do
- Wordless::CLI.start ['wp']
- File.directory?('wordpress/wordpress').should eq false
- end
- end
-
- context "with a custom directory name" do
- it "downloads a copy of WordPress in directory 'myapp'" do
- Wordless::CLI.start ['wp', 'myapp']
- File.exists?('myapp/wp-content/index.php').should eq true
- end
- end
-
- context "with the 'bare' option" do
- it "downloads a copy of WordPress and removes default plugins and themes" do
- Wordless::CLI.start ['wp', '--bare']
- (File.exists?('wordpress/wp-content/plugins/plugin.php') || File.directory?('wordpress/wp-content/themes/theme')).should eq false
- end
- end
- end
-
context "#install" do
context "with a valid WordPress installation" do
it "installs the Wordless plugin" do
- Wordless::CLI.start ['wp']
+ WordPressTools::CLI.start ['new']
Dir.chdir 'wordpress'
Wordless::CLI.start ['install']
File.directory?('wp-content/plugins/wordless').should eq true
end
end
@@ -81,11 +48,11 @@
end
context "#theme" do
context "with a valid WordPress installation and the Wordless plugin" do
before :each do
- Wordless::CLI.start ['wp']
+ WordPressTools::CLI.start ['new']
Dir.chdir 'wordpress'
Wordless::CLI.start ['install']
end
it "creates a Wordless theme" do
@@ -101,10 +68,10 @@
content.should =~ %r|Directory 'wp-content/themes' not found|
end
end
end
- context "#compile", :now => true do
+ context "#compile" do
context "with a valid Wordless installation" do
before :each do
Wordless::CLI.start ['new', 'myapp']
end
\ No newline at end of file