Skip to content

jarroddalefolino/cspec

Repository files navigation

Cspec

Running test cases via CSV

The goal of this project is to have a centralised location where all specs can be run

Quick start

  • Add this to your Gemfile
  gem 'cspec'
  • Create a CSV named specs.csv with the following spec
class,name,type,initialization_arg_1,method,method_arg_1,expected
MyClass,my test,,hello,,world
  • Create a file named my_csv_specs.rb to run the specs
require 'cspec'

# The implementation of the Ruby class being testedc
class MyClass
  def hello
    'world'
  end
end

# Running the specs
result = CSpec::Runner.run!("#{Dir.pwd}/specs.csv")
puts "Success: #{result}"
  • Run with ruby my_csv_specs.rb

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published