Skip to content

Instantly share code, notes, and snippets.

@tjh
Created February 8, 2012 02:32
Show Gist options
  • Save tjh/1764698 to your computer and use it in GitHub Desktop.
Save tjh/1764698 to your computer and use it in GitHub Desktop.
Test MicroGem

TestClass

Description and usage:

require 'test_class'
TestClass.new

Running the tests

Install the rspec gem

gem install rspec

Run the spec

rspec test_class_spec.rb
Gem::Specification.new do |s|
s.name = 'test_class'
s.summary = ''
s.description = ''
s.version = '0.0.1'
s.platform = Gem::Platform::RUBY
s.files = ['test_class.rb']
s.require_path = '.'
s.author = ''
s.email = ''
s.homepage = ''
s.test_file = 'test_class_spec.rb'
s.add_development_dependency('rspec', ["~> 2.8"])
end
class TestClass
end
require File.expand_path('test_class')
describe TestClass do
it 'should have tests' do
pending
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment