Permalink
Browse files

Fix RSpec code

  • Loading branch information...
1 parent 7197ba8 commit 244aabe65aebbc71b114d51f978b9dedc491427d @D4L committed Aug 5, 2012
View
@@ -8,3 +8,5 @@ RSpec::Core::RakeTask.new do |t|
t.rspec_opts = %w(-fs --color)
t.ruby_opts = %w(-w)
end
+
+task :default => :spec
View
@@ -16,4 +16,6 @@ Gem::Specification.new do |gem|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
+
+ gem.add_development_dependency 'rspec', '~> 2.5'
end
@@ -4,7 +4,7 @@ module AbstractGraph
class Graph
# public constructor
- def initialize
+ def initialise
end
end
@@ -1,9 +1,9 @@
require 'spec_helper'
-describe "Graph" do
+describe AbstractGraph::Graph do
describe "initialize" do
it "returns an object of class Graph" do
- Graph.new.class.should == Graph
+ AbstractGraph::Graph.new.class.should == AbstractGraph::Graph
end
end
end
@@ -0,0 +1,9 @@
+require 'spec_helper'
+
+describe AbstractGraph do
+ describe initialise do
+ it 'should return correct version string' do
+ AbstractGraph.version_string.should == "AbstractGraph version #{AbstractGraph::VERSION}"
+ end
+ end
+end
View
@@ -1 +1,10 @@
-require 'abstract_graph/abstract_graph'
+require 'rspec'
+require 'abstract_graph'
+
+# below already coded inside the rakefile
+=begin
+RSpec.configure do |config|
+ config.color_enabled = true
+ config.formatter = 'documentation'
+end
+=end

0 comments on commit 244aabe

Please sign in to comment.