Project

cspec

0.0
No release in over a year
A testing framework to run unit tests via csv
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0
>= 0

Runtime

~> 0.8.1
 Project Readme

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