Problem It’s an exercise from a RSpec-course, which I’m currently doing. Task: Create a compound expectation, which asserts the string […]
Tag: rspec
Weekly flex calculator
Problem This is one of the first RSpec tests I’ve written, and I’m not really sure what the best practices […]
First BDD/RSpec tests, would like some review regarding idioms, conventions and style
Problem This is my first attempt at BDD and RSpec. I’m more of a C# xUnit kind of guy. I […]
Unit-testing account transaction code
Problem I’m playing with unit-testing in Ruby. There is a situation that I don’t know if is good enough or […]
City class and spec for testing it
Problem I have written a class and spec for testing my class. Can anyone determine whether or not this is […]
Building a chain of responsibility in Ruby to apply transformators on an object
Problem I try to make a middleware stack system in the rack way (but not for HTTP request). Here is […]
RSpec test for handling known IP addresses
Problem I want to replace the array of ips with a method (like known_ips or just ips) but I don’t […]
Displaying the calenday day
Problem I have this (working) code: class CalendarDay attr_accessor :from_month, :to_month, :year def self.line_of_day_numbers(month,year,start,offset) @line=” @offset=offset finish = (start+6)-@offset self.first_line_padding(start) […]
Ruby Kata Gem: WordWrap
Problem I’ve just completed the WordWrap Kata in the Ruby Kata gem and I’d love some feedback. Thanks! Here’s the […]
Cash Register Kata
Problem The Setup This kata is a spin on the old backpack problem. Please give feedback on both the kata […]