Skip to content

Commit

Permalink
Merge pull request #24 from TaKO8Ki/fix-doc-comment
Browse files Browse the repository at this point in the history
Fix doc comment
  • Loading branch information
TaKO8Ki authored Jun 27, 2020
2 parents 561757a + 1a1d086 commit 3b3bddb
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- 'v*'
jobs:
release:
name: Check version, Add tag and release
name: Cargo publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description = "A library for preparing test data from yaml files in Rust"
repository = "https://github.com/TaKO8Ki/testfixtures"
documentation = "https://docs.rs/testfixtures"
readme = "README.md"
keywords = ["test", "testdata", "db", "sqlx", "mysql"]
keywords = [ "test", "testdata", "db", "sqlx", "mysql" ]
categories = [ "database" ]

[dependencies]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [WIP] testfixtures
# testfixtures

[![build]](https://github.com/TaKO8Ki/testfixtures/actions) [![docs]](#) [![license]](https://github.com/TaKO8Ki/testfixtures/blob/master/LICENSE)
[![build]](https://github.com/TaKO8Ki/testfixtures/actions) [![docs]](https://crates.io/crates/testfixtures) [![license]](https://github.com/TaKO8Ki/testfixtures/blob/master/LICENSE)

[build]: https://img.shields.io/github/workflow/status/TaKO8Ki/testfixtures/CI/master?logo=github
[license]: https://img.shields.io/github/license/TaKO8Ki/testfixtures
Expand Down Expand Up @@ -35,12 +35,12 @@ Create fixture files like the following.
`todos.yml`
```yml
- id: 1
description: fizz
description: buy a new camera
done: true
progress: 10.5
created_at: 2020/01/01 01:01:01
- id: 2
description: buzz
description: meeting
done: false
progress: 30.0
created_at: 2020/01/01 02:02:02
Expand Down
8 changes: 4 additions & 4 deletions src/fixture_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ mod tests {
#[test]
fn test_file_stem() -> anyhow::Result<()> {
let dir = tempdir()?;
let file_path = dir.path().join("test.yml");
let file_path = dir.path().join("todos.yml");
let fixture_file_path = file_path.clone();
let mut file = File::create(file_path)?;
writeln!(
Expand All @@ -83,14 +83,14 @@ mod tests {
insert_sqls: vec![],
};

assert_eq!(fixture_file.file_stem(), "test");
assert_eq!(fixture_file.file_stem(), "todos");
Ok(())
}

#[test]
fn test_delete() -> anyhow::Result<()> {
let dir = tempdir()?;
let file_path = dir.path().join("test.yml");
let file_path = dir.path().join("todos.yml");
let fixture_file_path = file_path.clone();
let mut file = File::create(file_path)?;
writeln!(
Expand All @@ -116,7 +116,7 @@ mod tests {
insert_sqls: vec![],
};

assert_eq!(fixture_file.delete(), "DELETE FROM test");
assert_eq!(fixture_file.delete(), "DELETE FROM todos");
Ok(())
}
}
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
//! ```yml
//! - id: 1
//! description: buy a new camera
//! done: 0
//! done: true
//! progress: 10.5
//! created_at: 2020/01/01 01:01:01
//! - id: 2
//! description: meeting
//! done: 0
//! done: false
//! progress: 30.0
//! created_at: 2020/01/01 02:02:02
//! ```
//!
//! ```rust
Expand Down Expand Up @@ -47,13 +51,9 @@ mod fixture_file;
mod helper;
mod loader;
mod mysql;
// mod postgresql;

// reexport key APIs
pub use fixture_file::{FixtureFile, InsertSql, SqlParam};
pub use helper::Database;
pub use loader::Loader;
pub use mysql::helper::MySql;
pub use mysql::loader::MySqlLoader;
// pub use postgresql::helper::PostgreSql;
// pub use postgres::loader::PgLoader;
Loading

0 comments on commit 3b3bddb

Please sign in to comment.