MRuby Spec (or MSpec) is a Behaviour Driven Development framework for MRuby inspired in RSpec.
Add mruby-spec as a dependency on your MRuby's build_config.rb
MRuby::Build.new('test') do |conf|
# Your build configuration
conf.gem github: 'sagmor/mruby-spec'
conf.enable_test
endWrite your tests using BDD syntaxt
describe YourClass do
it "does something" do
expect(false).to be true
end
endAnd watch it fail
# If you are using mruby-cli
bundle exec mrb test
# or if you are on MRuby's directory
./minirake testBug reports and pull requests are welcome on GitHub at https://github.com/sagmor/mruby-spec/issues. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.