Sha256: 4a0b670a210896404705a2b07eda235e350faa1b030ff63e6e89963970605cde
Contents?: true
Size: 1009 Bytes
Versions: 4
Compression:
Stored size: 1009 Bytes
Contents
require 'spec_helper' describe Screenshots::Page do before(:all) do @url = 'https://github.com/rails/rails?param=1&x=2' @page = Screenshots::Page.new(@url) end describe "#url" do it "returns the URL" do expect(@page.url).to eq(@url) end end describe "#title" do it "returns the page meta title" do expect(@page.title).to eq('rails/rails ยท GitHub') end end describe "#screenshot_name" do it "is generated from the url" do expect(@page.screenshot_name).to eq('https_github.com_rails_rails_param_1_x_2') end end describe "#screenshot_url" do it "returns the full url of the screenshot on the blog" do expect(@page.screenshot_url).to eq('http://blog/https_github.com_rails_rails_param_1_x_2.jpg') end end describe "#generate_blog_section" do it "generates HTML code with a title and a picture" do output = TestData.github_html_section expect(@page.generate_blog_section).to eq(output) end end end
Version data entries
4 entries across 4 versions & 1 rubygems