Skip to content

Commit

Permalink
* Add test specs to aid eyeballing functionality in
Browse files Browse the repository at this point in the history
   preparation for pulling in other pull requests.
 * Use 'clean_backtrace' conditionally if available
   (clean_backtrace is provided by ActiveSupport)
  • Loading branch information
duskhacker committed Sep 1, 2011
1 parent 196a6cb commit 8fe10e4
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/sweet_vim_rspec1_formatter.rb
Expand Up @@ -18,7 +18,11 @@ def dump_failure counter, failure


data << failure.exception.message data << failure.exception.message
data << "\n+-+ Backtrace\n" data << "\n+-+ Backtrace\n"
data << failure.exception.clean_backtrace.join("\n") data << if failure.exception.respond_to?(:clean_backtrace)
failure.exception.clean_backtrace.join("\n")
else
failure.exception.backtrace.join("\n")
end
data << "\n-+-\n" * 2 data << "\n-+-\n" * 2
output.puts data output.puts data
end end
Expand Down
2 changes: 2 additions & 0 deletions spec/rspec_1/Gemfile
@@ -0,0 +1,2 @@
gem 'rspec', '= 1.3.1'
gem 'rspec-rails', '=1.3.3'
14 changes: 14 additions & 0 deletions spec/rspec_1/Gemfile.lock
@@ -0,0 +1,14 @@
GEM
specs:
rack (1.2.3)
rspec (1.3.1)
rspec-rails (1.3.3)
rack (>= 1.0.0)
rspec (= 1.3.1)

PLATFORMS
ruby

DEPENDENCIES
rspec (= 1.3.1)
rspec-rails (= 1.3.3)
11 changes: 11 additions & 0 deletions spec/rspec_1/example_spec.rb
@@ -0,0 +1,11 @@
describe "A Test" do
it "should pass" do
true.should be_true
end

it "should fail" do
true.should_not be_true
end

it "should be pending"
end
1 change: 1 addition & 0 deletions spec/rspec_2/Gemfile
@@ -0,0 +1 @@
gem 'rspec'
17 changes: 17 additions & 0 deletions spec/rspec_2/Gemfile.lock
@@ -0,0 +1,17 @@
GEM
specs:
diff-lcs (1.1.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)

PLATFORMS
ruby

DEPENDENCIES
rspec
11 changes: 11 additions & 0 deletions spec/rspec_2/example_spec.rb
@@ -0,0 +1,11 @@
describe "A Test" do
it "should pass" do
true.should be_true
end

it "should fail" do
fail "It failed!"
end

it "should be pending"
end

0 comments on commit 8fe10e4

Please sign in to comment.