Beginning to remove refinery stuff
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Refinery::WordPress::Attachment, :type => :model do
|
||||
describe WordPressImport::Attachment, :type => :model do
|
||||
context "an image attchment" do
|
||||
let(:attachment) { test_dump.attachments.first }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Refinery::WordPress::Author, :type => :model do
|
||||
describe WordPressImport::Author, :type => :model do
|
||||
let(:author) { test_dump.authors.first }
|
||||
|
||||
specify { author.login.should == 'admin' }
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Refinery::WordPress::Category, :type => :model do
|
||||
let(:category) { Refinery::WordPress::Category.new('Rant') }
|
||||
describe WordPressImport::Category, :type => :model do
|
||||
let(:category) { WordPressImport::Category.new('Rant') }
|
||||
|
||||
describe "#name" do
|
||||
specify { category.name.should == 'Rant' }
|
||||
end
|
||||
|
||||
describe "#==" do
|
||||
specify { category.should == Refinery::WordPress::Category.new('Rant') }
|
||||
specify { category.should_not == Refinery::WordPress::Category.new('Tutorials') }
|
||||
specify { category.should == WordPressImport::Category.new('Rant') }
|
||||
specify { category.should_not == WordPressImport::Category.new('Tutorials') }
|
||||
end
|
||||
|
||||
describe "#to_refinery" do
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Refinery::WordPress::Dump, :type => :model do
|
||||
describe WordPressImport::Dump, :type => :model do
|
||||
let(:dump) { test_dump }
|
||||
|
||||
it "should create a Dump object given a xml file" do
|
||||
dump.should be_a Refinery::WordPress::Dump
|
||||
dump.should be_a WordPressImport::Dump
|
||||
end
|
||||
|
||||
it "should include a Nokogiri::XML object" do
|
||||
@@ -13,12 +13,12 @@ describe Refinery::WordPress::Dump, :type => :model do
|
||||
|
||||
describe "#tags" do
|
||||
let(:tags) do
|
||||
[ Refinery::WordPress::Tag.new('css'), Refinery::WordPress::Tag.new('html'),
|
||||
Refinery::WordPress::Tag.new('php'), Refinery::WordPress::Tag.new('ruby')]
|
||||
[ WordPressImport::Tag.new('css'), WordPressImport::Tag.new('html'),
|
||||
WordPressImport::Tag.new('php'), WordPressImport::Tag.new('ruby')]
|
||||
end
|
||||
|
||||
specify { dump.tags.count == 4 }
|
||||
specify { dump.tags.first.should be_a(Refinery::WordPress::Tag) }
|
||||
specify { dump.tags.first.should be_a(WordPressImport::Tag) }
|
||||
|
||||
it "should return all included tags" do
|
||||
tags.each do |tag|
|
||||
@@ -29,12 +29,12 @@ describe Refinery::WordPress::Dump, :type => :model do
|
||||
|
||||
describe "#categories" do
|
||||
let(:categories) do
|
||||
[ Refinery::WordPress::Category.new('Rant'), Refinery::WordPress::Category.new('Tutorials'),
|
||||
Refinery::WordPress::Category.new('Uncategorized') ]
|
||||
[ WordPressImport::Category.new('Rant'), WordPressImport::Category.new('Tutorials'),
|
||||
WordPressImport::Category.new('Uncategorized') ]
|
||||
end
|
||||
|
||||
specify { dump.categories.count == 4 }
|
||||
specify { dump.categories.first.should be_a(Refinery::WordPress::Category) }
|
||||
specify { dump.categories.first.should be_a(WordPressImport::Category) }
|
||||
|
||||
it "should return all included categories" do
|
||||
categories.each do |cat|
|
||||
@@ -48,7 +48,7 @@ describe Refinery::WordPress::Dump, :type => :model do
|
||||
dump.pages.should have(3).pages
|
||||
end
|
||||
|
||||
specify { dump.pages.first.should be_a(Refinery::WordPress::Page) }
|
||||
specify { dump.pages.first.should be_a(WordPressImport::Page) }
|
||||
|
||||
it "should return only published pages with only_published=true" do
|
||||
dump.pages(true).should have(2).pages
|
||||
@@ -60,7 +60,7 @@ describe Refinery::WordPress::Dump, :type => :model do
|
||||
dump.authors.should have(1).author
|
||||
end
|
||||
|
||||
specify { dump.authors.first.should be_a(Refinery::WordPress::Author) }
|
||||
specify { dump.authors.first.should be_a(WordPressImport::Author) }
|
||||
end
|
||||
|
||||
describe "#posts" do
|
||||
@@ -68,7 +68,7 @@ describe Refinery::WordPress::Dump, :type => :model do
|
||||
dump.posts.should have(3).posts
|
||||
end
|
||||
|
||||
specify { dump.posts.first.should be_a(Refinery::WordPress::Post) }
|
||||
specify { dump.posts.first.should be_a(WordPressImport::Post) }
|
||||
|
||||
it "should return only published posts with only_published=true" do
|
||||
dump.posts(true).should have(2).posts
|
||||
@@ -80,6 +80,6 @@ describe Refinery::WordPress::Dump, :type => :model do
|
||||
dump.attachments.should have(2).attachments
|
||||
end
|
||||
|
||||
specify { dump.attachments.first.should be_a(Refinery::WordPress::Attachment) }
|
||||
specify { dump.attachments.first.should be_a(WordPressImport::Attachment) }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Refinery::WordPress::Page, :type => :model do
|
||||
describe WordPressImport::Page, :type => :model do
|
||||
let(:dump) { test_dump }
|
||||
|
||||
let(:page) { test_dump.pages.last }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Refinery::WordPress::Post, :type => :model do
|
||||
describe WordPressImport::Post, :type => :model do
|
||||
let(:post) { test_dump.posts.last }
|
||||
|
||||
specify { post.title.should == 'Third blog post' }
|
||||
@@ -17,15 +17,15 @@ describe Refinery::WordPress::Post, :type => :model do
|
||||
|
||||
describe "#categories" do
|
||||
specify { post.categories.should have(1).category }
|
||||
specify { post.categories.first.should == Refinery::WordPress::Category.new('Rant') }
|
||||
specify { post.categories.first.should == WordPressImport::Category.new('Rant') }
|
||||
end
|
||||
|
||||
describe "#tags" do
|
||||
specify { post.tags.should have(3).tags }
|
||||
|
||||
specify { post.tags.should include(Refinery::WordPress::Tag.new('css')) }
|
||||
specify { post.tags.should include(Refinery::WordPress::Tag.new('html')) }
|
||||
specify { post.tags.should include(Refinery::WordPress::Tag.new('php')) }
|
||||
specify { post.tags.should include(WordPressImport::Tag.new('css')) }
|
||||
specify { post.tags.should include(WordPressImport::Tag.new('html')) }
|
||||
specify { post.tags.should include(WordPressImport::Tag.new('php')) }
|
||||
end
|
||||
|
||||
specify { post.tag_list.should == 'css,html,php' }
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Refinery::WordPress::Tag, :type => :model do
|
||||
let(:tag) { Refinery::WordPress::Tag.new('ruby') }
|
||||
describe WordPressImport::Tag, :type => :model do
|
||||
let(:tag) { WordPressImport::Tag.new('ruby') }
|
||||
|
||||
describe "#name" do
|
||||
specify { tag.name.should == 'ruby' }
|
||||
end
|
||||
|
||||
describe "#==" do
|
||||
specify { tag.should == Refinery::WordPress::Tag.new('ruby') }
|
||||
specify { tag.should_not == Refinery::WordPress::Tag.new('php') }
|
||||
specify { tag.should == WordPressImport::Tag.new('ruby') }
|
||||
specify { tag.should_not == WordPressImport::Tag.new('php') }
|
||||
end
|
||||
|
||||
describe "#to_refinery" do
|
||||
|
||||
Reference in New Issue
Block a user