Here is a sample spec, there is a bug in the spec (not in the models.)
What is the bug?
describe Order do
describe "#submit" do
before do
@book = Book.new(:title => "RSpec Intro", :price => 20)
Here is a sample spec, there is a bug in the spec (not in the models.)
What is the bug?
describe Order do
describe "#submit" do
before do
@book = Book.new(:title => "RSpec Intro", :price => 20)
Here is a simple Rails Model and a Hyperstack Component. The Hyperstack Component uses Opal Ruby. Opal is a version of Ruby that runs on the Browser.
Hyperstack is a gem that wraps React with a Ruby DSL.
class Order < ApplicationRecord
...
scope :shipped, -> () { where(status: :shipped) }
...
end