[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [websites/inqlude] spec: Clean up tests
From: Cornelius Schumacher <schumacher () kde ! org>
Date: 2016-10-15 22:49:42
Message-ID: E1bvXlu-0003rJ-PC () code ! kde ! org
[Download RAW message or body]
Git commit 3a4d498ea95bac67ce8de4f0ddccea06b1d1e4fe by Cornelius Schumacher.
Committed on 14/08/2016 at 14:36.
Pushed by cschumac into branch 'master'.
Clean up tests
* More expressive bracketing
* Remove redundant tests
M +14 -24 spec/integration/cli_view_spec.rb
M +24 -24 spec/online/cli_view_spec.rb
http://commits.kde.org/websites/inqlude/3a4d498ea95bac67ce8de4f0ddccea06b1d1e4fe
diff --git a/spec/integration/cli_view_spec.rb b/spec/integration/cli_view_spec.rb
index 252f2d1..80f4e4c 100644
--- a/spec/integration/cli_view_spec.rb
+++ b/spec/integration/cli_view_spec.rb
@@ -55,16 +55,6 @@ describe "Command line interface" do
"--output-dir=#{@output_dir}"])
end
- it "generates view" do
- expect(File.exist?(File.join(@output_dir, "inqlude-all.json"))).to be(true)
- end
-
- it "checks format" do
- data = File.read(File.join(@output_dir, 'inqlude-all.json'))
-
- expect {JSON.parse(data)}.to_not raise_error
- end
-
it "checks number of manifests" do
data = File.read(File.join(@output_dir, 'inqlude-all.json'))
parsed_data = JSON.parse(data);
@@ -78,7 +68,7 @@ describe "Command line interface" do
expect(handler.libraries.length).to eq parsed_data.length
end
- it "checks data" do
+ it "checks content" do
data = File.read(File.join(@output_dir, 'inqlude-all.json'))
parsed_data = JSON.parse(data);
for element in parsed_data do
@@ -98,22 +88,22 @@ describe "Command line interface" do
manifest = handler.library("awesomelib").latest_manifest
- (expect manifest.display_name).to eq "Awesomelib"
- (expect manifest.release_date).to eq "2013-09-08"
- (expect manifest.version).to eq "0.2.0"
- (expect manifest.summary).to eq "Awesome library"
- (expect manifest.topics).to eq ["API"]
+ expect(manifest.display_name).to eq "Awesomelib"
+ expect(manifest.release_date).to eq "2013-09-08"
+ expect(manifest.version).to eq "0.2.0"
+ expect(manifest.summary).to eq "Awesome library"
+ expect(manifest.topics).to eq ["API"]
- (expect manifest.urls.homepage).to eq "http://example.com"
- (expect manifest.urls.download).to eq "http://example.com/download"
- (expect manifest.urls.vcs).to eq "http://example.com/git"
+ expect(manifest.urls.homepage).to eq "http://example.com"
+ expect(manifest.urls.download).to eq "http://example.com/download"
+ expect(manifest.urls.vcs).to eq "http://example.com/git"
- (expect manifest.licenses).to eq ["LGPLv2.1+", "Commercial"]
- (expect manifest.description).to eq "This is an awesome library."
- (expect manifest.authors).to eq ["Cornelius Schumacher <schumacher@kde.org>"]
- (expect manifest.maturity).to eq "stable"
+ expect(manifest.licenses).to eq ["LGPLv2.1+", "Commercial"]
+ expect(manifest.description).to eq "This is an awesome library."
+ expect(manifest.authors).to eq ["Cornelius Schumacher <schumacher@kde.org>"]
+ expect(manifest.maturity).to eq "stable"
- (expect manifest.packages.source).to eq "ftp://example.com/download/awesomelib-0.2.0.tar.gz"
+ expect(manifest.packages.source).to eq "ftp://example.com/download/awesomelib-0.2.0.tar.gz"
end
end
end
diff --git a/spec/online/cli_view_spec.rb b/spec/online/cli_view_spec.rb
index 40f1c1a..46f343e 100644
--- a/spec/online/cli_view_spec.rb
+++ b/spec/online/cli_view_spec.rb
@@ -32,33 +32,33 @@ describe "Command line interface" do
manifest = handler.library("baloo").latest_manifest
- (expect manifest.display_name).to eq library["display_name"]
- (expect manifest.release_date).to eq library["release_date"]
- (expect manifest.version).to eq library["version"]
- (expect manifest.summary).to eq library["summary"]
- (expect manifest.topics).to eq library["topics"]
+ expect(manifest.display_name).to eq library["display_name"]
+ expect(manifest.release_date).to eq library["release_date"]
+ expect(manifest.version).to eq library["version"]
+ expect(manifest.summary).to eq library["summary"]
+ expect(manifest.topics).to eq library["topics"]
- (expect manifest.urls.homepage).to eq library["urls"]["homepage"]
- (expect manifest.urls.api_docs).to eq library["urls"]["api_docs"]
- (expect manifest.urls.download).to eq library["urls"]["download"]
- (expect manifest.urls.tutorial).to eq library["urls"]["tutorial"]
- (expect manifest.urls.vcs).to eq library["urls"]["vcs"]
- (expect manifest.urls.description_source).to eq library["urls"]["description_source"]
- (expect manifest.urls.announcement).to eq library["urls"]["announcement"]
- (expect manifest.urls.mailing_list).to eq library["urls"]["mailing_list"]
- (expect manifest.urls.contact).to eq library["urls"]["contact"]
- (expect manifest.urls.custom).to eq library["urls"]["custom"]
+ expect(manifest.urls.homepage).to eq library["urls"]["homepage"]
+ expect(manifest.urls.api_docs).to eq library["urls"]["api_docs"]
+ expect(manifest.urls.download).to eq library["urls"]["download"]
+ expect(manifest.urls.tutorial).to eq library["urls"]["tutorial"]
+ expect(manifest.urls.vcs).to eq library["urls"]["vcs"]
+ expect(manifest.urls.description_source).to eq library["urls"]["description_source"]
+ expect(manifest.urls.announcement).to eq library["urls"]["announcement"]
+ expect(manifest.urls.mailing_list).to eq library["urls"]["mailing_list"]
+ expect(manifest.urls.contact).to eq library["urls"]["contact"]
+ expect(manifest.urls.custom).to eq library["urls"]["custom"]
- (expect manifest.licenses).to eq library["licenses"]
- (expect manifest.description).to eq library["description"]
- (expect manifest.authors).to eq library["authors"]
- (expect manifest.maturity).to eq library["maturity"]
+ expect(manifest.licenses).to eq library["licenses"]
+ expect(manifest.description).to eq library["description"]
+ expect(manifest.authors).to eq library["authors"]
+ expect(manifest.maturity).to eq library["maturity"]
- (expect manifest.packages.source).to eq library["packages"]["source"]
- (expect manifest.packages.openSUSE).to eq library["packages"]["openSUSE"]
- (expect manifest.packages.windows).to eq library["packages"]["windows"]
- (expect manifest.packages.ubuntu).to eq library["packages"]["ubuntu"]
- (expect manifest.packages.osx).to eq library["packages"]["osx"]
+ expect(manifest.packages.source).to eq library["packages"]["source"]
+ expect(manifest.packages.openSUSE).to eq library["packages"]["openSUSE"]
+ expect(manifest.packages.windows).to eq library["packages"]["windows"]
+ expect(manifest.packages.ubuntu).to eq library["packages"]["ubuntu"]
+ expect(manifest.packages.osx).to eq library["packages"]["osx"]
end
end
end
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic