Permalink
Browse files

use minitest

  • Loading branch information...
1 parent 004e826 commit d4ee5100d55f9258c1284efffbcbe51eaaff388b @despo committed Dec 30, 2013
Showing with 29 additions and 20 deletions.
  1. +1 −1 CONTRIBUTING.md
  2. +5 −0 README.md
  3. +6 −0 Rakefile
  4. +0 −16 spec/requests/issues_spec.rb
  5. +16 −0 test/requests/issues_test.rb
  6. +1 −3 spec/spec_helper.rb → test/test_helper.rb
View
@@ -3,7 +3,7 @@
## Quick guide:
1. Fork the repo.
-2. Add a test for your change. Only styling, documentation and refactoring changes don't require any new tests.If you are adding functionality or fixing a bug, we need a test! Also, no need to test rails!
+2. Add a test for your change. Only styling, documentation and refactoring changes (that are already covered by tests) don't require any new tests. If you are adding functionality or fixing a bug, you need a test! Also, no need to test rails!
3. Make the test pass.
4. Commit, with a meaningul describing message. This is very important!
5. Push to your fork and submit a pull request.
View
@@ -18,6 +18,11 @@ The reason for making this project is to encourage issue labelling on open sourc
gem install bundler
bundle install
```
+###make sure the tests are passing
+
+```bash
+rake test
+```
###run the app!
View
@@ -0,0 +1,6 @@
+require 'rake/testtask'
+Rake::TestTask.new do |t|
+ t.pattern = "test/*/*_test.rb"
+end
+
+task :default => [:test]
@@ -1,16 +0,0 @@
-require 'spec_helper'
-
-describe Kobol::Requests::Issues do
- let(:issues) { Kobol::Requests::Issues.new(:token) }
-
- before do
- Kobol::Requests::Issues.send(:public, :search_params)
- end
-
- it "#search_params" do
- properties = { label: ["bug", "refactoring"], language: ["ruby"] }
- processed_properties = "label:bug label:refactoring language:ruby"
-
- issues.search_params(properties).should eq(processed_properties)
- end
-end
@@ -0,0 +1,16 @@
+require_relative '../test_helper'
+
+describe Kobol::Requests::Issues do
+ let(:issues) { Kobol::Requests::Issues.new }
+
+ before do
+ Kobol::Requests::Issues.send(:public, :search_params)
+ end
+
+ it "#search_params" do
+ properties = { label: ["bug", "refactoring"], language: ["ruby"] }
+ processed_properties = %{label:"bug" label:"refactoring" language:"ruby"}
+
+ issues.search_params(properties).must_equal(processed_properties)
+ end
+end
@@ -1,5 +1,3 @@
-APP_ROOT = File.dirname(__FILE__)
-
$:.unshift File.expand_path("./lib")
require 'kobol'
-
+require 'minitest/autorun'

0 comments on commit d4ee510

Please sign in to comment.