Sha256: 1cc8765c98cca25c56454ec6e1a9a189df7635034923befe5577f462f8180268
Contents?: true
Size: 576 Bytes
Versions: 9
Compression:
Stored size: 576 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Spree::ReviewsHelper do context 'star' do specify do expect(star('a_class')).to eq '<span class="a_class"> ✮ </span>' end end context 'mk_stars' do specify do matches = mk_stars(2).scan(/unlit/) expect(matches.length).to eq 3 end end context 'txt_stars' do specify do expect(txt_stars(2, true)).to eq '2 out of 5' end specify do expect(txt_stars(3, false)).to be_a String expect(txt_stars(3, false)).to eq('3') end end end
Version data entries
9 entries across 9 versions & 1 rubygems