Sha256: b4ffd4949f14704dc896d0f444382e1d40c5754fc71c09439f518bde54ed547f
Contents?: true
Size: 620 Bytes
Versions: 3
Compression:
Stored size: 620 Bytes
Contents
require 'rails_helper' module WebAdmin RSpec.describe Video, :type => :model do context "Validations" do it { should validate_presence_of :description } it { should validate_presence_of :link } end describe "to_s" do it 'return description' do subject.stub(description: "Primeiro Video") expect(subject.to_s).to eq "Primeiro Video" end end describe "extract_id" do it 'return hash link' do subject.stub(:link).and_return 'http://youtube.com/v=video_teste' expect(subject.extract_id).to eq 'video_teste' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
web_admin-0.1.0 | spec/models/admin_web/video_spec.rb |
web_admin-0.0.2 | spec/models/admin_web/video_spec.rb |
web_admin-0.0.1 | spec/models/admin_web/video_spec.rb |