|
3 | 3 | require File.dirname(__FILE__) + '/spec_helper.rb'
|
4 | 4 | require 'date'
|
5 | 5 |
|
6 |
| -context "ONIX::APAProduct" do |
| 6 | +describe "ONIX::APAProduct" do |
7 | 7 |
|
8 | 8 | before(:each) do
|
9 | 9 | @data_path = File.join(File.dirname(__FILE__),"..","data")
|
|
12 | 12 | @product_node = @doc.root
|
13 | 13 | end
|
14 | 14 |
|
15 |
| - specify "should provide read access to attributes" do |
| 15 | + it "should provide read access to attributes" do |
16 | 16 | @product = ONIX::Product.from_xml(@product_node.to_s)
|
17 | 17 | @apa = ONIX::APAProduct.new(@product)
|
18 | 18 |
|
|
26 | 26 | @apa.pack_quantity.should eql(12)
|
27 | 27 | end
|
28 | 28 |
|
29 |
| - specify "should provide write access to attributes" do |
| 29 | + it "should provide write access to attributes" do |
30 | 30 | apa = ONIX::APAProduct.new
|
31 | 31 |
|
32 | 32 | apa.notification_type = 3
|
|
56 | 56 |
|
57 | 57 | end
|
58 | 58 |
|
59 |
| -context ONIX::APAProduct, "series method" do |
60 |
| - specify "should set the nested series value on the underlying product class" do |
| 59 | +describe ONIX::APAProduct, "series method" do |
| 60 | + it "should set the nested series value on the underlying product class" do |
61 | 61 | apa = ONIX::APAProduct.new
|
62 | 62 |
|
63 | 63 | apa.series = "Harry Potter"
|
|
66 | 66 | end
|
67 | 67 | end
|
68 | 68 |
|
69 |
| -context ONIX::APAProduct, "price method" do |
| 69 | +describe ONIX::APAProduct, "price method" do |
70 | 70 | before(:each) do
|
71 | 71 | @data_path = File.join(File.dirname(__FILE__),"..","data")
|
72 | 72 | file1 = File.join(@data_path, "usd.xml")
|
73 | 73 | @doc = Nokogiri::XML::Document.parse(File.read(file1))
|
74 | 74 | @product_node = @doc.root
|
75 | 75 | end
|
76 | 76 |
|
77 |
| - specify "should return the first price in the file, regardless of type" do |
| 77 | + it "should return the first price in the file, regardless of type" do |
78 | 78 | @product = ONIX::Product.from_xml(@product_node.to_s)
|
79 | 79 | @apa = ONIX::APAProduct.new(@product)
|
80 | 80 |
|
81 | 81 | @apa.price.should eql(BigDecimal.new("99.95"))
|
82 | 82 | end
|
83 | 83 | end
|
84 | 84 |
|
85 |
| -context ONIX::APAProduct, "rrp_exc_sales_tax method" do |
| 85 | +describe ONIX::APAProduct, "rrp_exc_sales_tax method" do |
86 | 86 | before(:each) do
|
87 | 87 | @data_path = File.join(File.dirname(__FILE__),"..","data")
|
88 | 88 | file1 = File.join(@data_path, "usd.xml")
|
89 | 89 | @doc = Nokogiri::XML::Document.parse(File.read(file1))
|
90 | 90 | @product_node = @doc.root
|
91 | 91 | end
|
92 | 92 |
|
93 |
| - specify "should return the first price in the file of type 1" do |
| 93 | + it "should return the first price in the file of type 1" do |
94 | 94 | @product = ONIX::Product.from_xml(@product_node.to_s)
|
95 | 95 | @apa = ONIX::APAProduct.new(@product)
|
96 | 96 |
|
|
0 commit comments